Module:Protection banner: Difference between revisions
Content added Content deleted
Enwikipedia>Mr. Stradivarius (try different format for behaviors table) |
Enwikipedia>Mr. Stradivarius (add custom error for p.renderPadlock) |
||
Line 310: | Line 310: | ||
-- |
-- |
||
-- @parameters: |
-- @parameters: |
||
-- image - the image wikitext |
-- image - the image wikitext (required) |
||
-- right - the "right" css property value, as a string |
-- right - the "right" css property value, as a string (optional) |
||
-- |
|||
-- Both parameters are optional. |
|||
--]] |
--]] |
||
local root = mw.html.create('div') |
local root = mw.html.create('div') |
||
Line 320: | Line 318: | ||
: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 or error('No image parameter specified in p.renderPadlock')) |
||
return tostring(root) |
return tostring(root) |
||
end |
end |