Module:UserPageEditing

local p = {} local mArguments = require("Module:Arguments")

p._error = function(text) local errorText = mw.html.create("span") errorText :css("color", "red") :wikitext(text) return tostring(errorText) end

p.main = function(frame) local args = mArguments.getArgs(frame, {       parentOnly = true,        trim = true,        removeBlanks = true,    })

local mode = args.mode args.mode = nil local marker = mw.html.create("span") marker:css("display", "none") local editNotice = mw.html.create("div") editNotice :css("border", "1px solid #aaa") :css("padding", "10px") if (mode == "public") then editNotice:wikitext("This is a public user page.") marker:wikitext("[//USERPAGE.PUBLIC]") elseif (mode == "blacklist") then editNotice:wikitext("This is a public user page, except for the editors specified.") marker:wikitext("[//USERPAGE.BLACKLIST]") elseif (mode == "whitelist") then editNotice:wikitext("This is a private user page, except for the editors specified.") marker:wikitext("[//USERPAGE.WHITELIST]") else return p._error("unknown mode") end if (mode ~= "public") then for k, v in pairs(args) do           marker:wikitext("[//User:"..v.."]") end end editNotice:node(marker) return tostring(editNotice) end

return p