置顶公告:【置顶】关于临时开启评论区所有功能的公告(2022.10.22) | 【置顶】关于本站Widget恢复使用的公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Module:Sandbox/一位史蒂夫/Signature

猛汉♂百科,万男皆可猛的百科全书!转载请标注来源页面的网页链接,并声明引自猛汉百科。内容不可商用。
跳到导航 跳到搜索
Template-info.svg 模块文档  [创建] [刷新]
local p = {}--[[
仿照Leranjun写的模块,用于个人签名。
--]]
 
local function notempty(s)
    return (s and s ~= "")
end
 
function p.main(frame)
    if (notempty(frame.args["link"])) then
        local r = "[[:" .. frame.args["link"] .. '|<span style="color:#30D5C8;text-shadow:0px 0px 10px #7EE5DD">'
        if (notempty(frame.args["text"])) then
            r = r .. frame.args["text"]
        else
            r = r .. frame.args["link"]
        end
        return r .. "</span>]]"
    end
 
    local items = {
        {
            "虚拟UP主/梗#单推",
            "单推人"
        },
        {
            "兽耳助手",
            "兽耳控"
        },
        {
            "MGP:技术编辑员",
            "技师"
        },
        {
            "MGP:维护姬",
            "维护姬"
        },
        {
            "东方Project",
            "东方众"
        },
        {
            "芳文社",
            "芳文厨"
        }
    }
 
    math.randomseed(tostring(os.time()):reverse():sub(1, 6))
    local rand = math.random(#items)
 
    return "[[:" ..
        items[rand][1] .. '|<span style="color:#30D5C8;text-shadow:0px 0px 10px #7EE5DD">' .. (items[rand][2] or items[rand][1]) .. "</span>]]"
end
 
return p