Module:Protection banner: Difference between revisions
Content added Content deleted
Enwikipedia>Mr. Stradivarius (add custom error for p.renderPadlock) |
Enwikipedia>Mr. Stradivarius (try doing the error check earlier) |
||
Line 313: | Line 313: | ||
-- right - the "right" css property value, as a string (optional) |
-- right - the "right" css property value, as a string (optional) |
||
--]] |
--]] |
||
image = image or error('No image parameter specified in p.renderPadlock') |
|||
local root = mw.html.create('div') |
local root = mw.html.create('div') |
||
root |
root |
||
Line 318: | Line 319: | ||
:attr('id', 'protected-icon') |
:attr('id', 'protected-icon') |
||
:css{display = 'none', right = right or '55px'} |
:css{display = 'none', right = right or '55px'} |
||
:wikitext(image |
:wikitext(image) |
||
return tostring(root) |
return tostring(root) |
||
end |
end |