FANDOM


local p = {}
function p.main(frame)
    local args = frame:getParent().args
    local tag = args[1] or ""
    local message = args[2] or ""
    local text
 
    -- Does something based on tag
    if tag == 'p' then
        text = mw.html.create('pre')
            :css({
                ['background-color'] = '#080f198f',
                ['border'] = '1px solid #3e4956c2'
            })
            :wikitext(message)
            :done()
        return text
    elseif tag == 'c' then
        text = mw.html.create('code')
            :css({
                ['background-color'] = '#080f198f',
                ['border'] = '1px solid #3e4956c2',
                ['border-radius'] = '2px',
                ['padding'] = '1px 4px'
            })
            :wikitext(message)
            :done()
        return text
    elseif tag == "" then
        return ERR('Please enter an argument')
    else
        return ERR('Unrecognized argument "' .. tag ..'"')
    end
end
 
function ERR(text)
    local span = mw.html.create('span')
        :css({
            ['color'] = 'red',
            ['font-weight'] = 'bold',
        })
        :wikitext('[[Category:Category:Pages_with_script_errors]]' .. text)
        :done()
    return span
end
return p
Community content is available under CC-BY-SA unless otherwise noted.