Module:Protection banner: Difference between revisions

use the config to set the padlock "right" propery, and remove the Padlock:setRight method
(simplify Protection:makeProtectionCategory and update the comments)
(use the config to set the padlock "right" propery, and remove the Padlock:setRight method)
Line 793:
self._imageAlt = blurbObj:makeAltText()
self._imageLink = blurbObj:makeLinkText()
self._right = cfg.padlockPositions[action]
end
or cfg.padlockPositions.default
 
or '55px'
function Padlock:setRight(px)
self._right = px
end
 
Line 804 ⟶ 803:
:addClass('metadata topicon nopopups')
:attr('id', 'protected-icon')
:css{display = 'none', right = self._right or '55px'}
:wikitext(self:renderImage())
return tostring(root)