Module:Title blacklist/sandbox

< Module:Title blacklist
Revision as of 18:03, 14 November 2024 by Muskit Gergous (talk | contribs) (Created page with "--helper module for title blacklist local p = {} p._main = function(args) local action = args['action'] local pagename = args['pagename'] local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if blacklistentry.params.autoconfirmed then return args['autoconfirmed'] or "autoconfirmed" else return args['templateeditor'] or "templateeditor" end else return '' end end p.main = function(frame) local args = frame.args re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Title blacklist/sandbox/doc

--helper module for title blacklist

local p = {}
p._main = function(args)
	local action = args['action']
	local pagename = args['pagename']
	local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
	if blacklistentry then
		if blacklistentry.params.autoconfirmed then
			return args['autoconfirmed'] or "autoconfirmed"
		else
			return args['templateeditor'] or "templateeditor"
		end
	else return '' end
end

p.main = function(frame)
	local args = frame.args
	return p._main(args)
end

return p