This module was made as a sandbox for the user Cqm. This documentation is kept to prevent redlinks.
-- <pre>
local p = {}
function p.check(frame)
local args = frame.args
local page = args[1]
local title = mw.title.new(page)
if title.protectionLevels.edit[1] == 'codeeditor' then
return args[1]
end
return '[' .. tostring(mw.uri.fullUrl(args[1], {
action = 'protect',
['mwProtect-level-edit'] = 'codeeditor',
['mwProtect-level-move'] = 'codeeditor',
['mwProtect-reason'] = 'preventing potential vandalism'
})) .. ' ' .. args[1] .. '] (unprotected)'
end
return p