Jump to content

Module:Protection banner: Difference between revisions

try doing the error check earlier
(add custom error for p.renderPadlock)
(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 or error('No image parameter specified in p.renderPadlock'))
:wikitext(image)
return tostring(root)
return tostring(root)
end
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.