查看“模块:SafeCate”的源代码
来自东方Project线下活动维基
因为以下原因,您没有权限编辑本页:
您可以查看和复制此页面的源代码。
local module = {}
local function _isvalid(value)
return value ~= nil and type(value) == "string" and mw.text.trim(value) ~= ""
end
function module.main(frame)
local strict = frame
local parent = frame:getParent()
if not _isvalid(frame.args[1]) then
if not (parent and _isvalid(parent.args[1])) then return end
local title = parent:getTitle()
if title == "Template:SafeCate" then
strict, frame = parent, parent
elseif mw.title.new(title).namespace == 10 and frame.args["strict"]=="1" then
frame = parent
else return end
end
local cate = frame.args[1]
local mod = frame.args[2]
000
1:0
本页使用的模板:
返回模块:SafeCate。