Jump to content

Module:Title blacklist/sandbox

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Awesome Aasim (talk | contribs) at 17:32, 22 March 2024. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
--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