匿名
未登录
中文(中国大陆)
登录
Limbo Wiki Mirror
搜索
查看“︁模块:BPersonal/SST”︁的源代码
来自Limbo Wiki Mirror
命名空间
模块
讨论
更多
更多
页面操作
阅读
查看源代码
历史
←
模块:BPersonal/SST
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local frame; local getArgs = require('Module:Arguments').getArgs; local p = {} function makeInvokeFunc(funcName) return function(frame) local args = getArgs(frame) return p[funcName](args) end end p.f1 = makeInvokeFunc('_RandomTextToNewText') function p._RandomTextToNewText(args) frame = mw.getCurrentFrame(); local txt = args[1] or "测试文本"; local newstr = args.newTxt or "永乐至高无上"; math.randomseed(string.len(txt)*24+1012) local length = math.floor(string.len(txt) / string.len(newstr) + 1);-- 6(汉字数)*3(常用汉字的字节数) local t = {"<span class=normal>",txt,"</span>"}; local i = 3 while length > 0 do if length < 4 then local next = math.random(length); if next == length then i = i + 1; t[i] = "<span class='hidden hide_" .. math.random(9) .. "'>" i = i + 1; t[i] = string.rep(newstr,next) i = i + 1; t[i] = "</span>" else i = i + 1; t[i] = "<span class='hidden hide_" .. math.random(9) .. "'>" i = i + 1; t[i] = string.rep(newstr,next) i = i + 1; t[i] = "</span>" i = i + 1; t[i] = "<span class='hidden hide_" .. math.random(9) .. "'>" i = i + 1; t[i] = string.rep(newstr,length-next) i = i + 1; t[i] = "</span>" end length = 0; else local next = 1 + math.random(3); length = length - next; i = i + 1; t[i] = "<span class='hidden hide_" .. math.random(9) .. "'>" i = i + 1; t[i] = string.rep(newstr,next) i = i + 1; t[i] = "</span>" end end return table.concat(t); end return p;
该页面使用的模板:
模块:BPersonal/SST/doc
(
查看源代码
)
返回
模块:BPersonal/SST
。
导航
导航
首页
最近更改
随机页面
操作申请
帮助
入门指南
编辑指南
写作指南
随机
官方
碎数研
谜题保管所
wiki工具
wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志