Module:Protection banner: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(switch to <indicator> tags again - the previous error was because the config module needs to be updated at the same time) |
|||
Line 825: | Line 825: | ||
obj._imageAlt = blurbObj:makeBannerText('alt') |
obj._imageAlt = blurbObj:makeBannerText('alt') |
||
obj._imageLink = blurbObj:makeBannerText('link') |
obj._imageLink = blurbObj:makeBannerText('link') |
||
obj. |
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] |
||
or cfg. |
or cfg.padlockIndicatorNames.default |
||
or ' |
or 'pp-default' |
||
return setmetatable(obj, Padlock) |
return setmetatable(obj, Padlock) |
||
end |
end |
||
function Padlock:__tostring() |
function Padlock:__tostring() |
||
return mw.getCurrentFrame():extensionTag{ |
|||
local root = mw.html.create('div') |
|||
name = 'indicator', |
|||
root |
|||
args = {name = self._indicatorName}, |
|||
:addClass('metadata topicon nopopups') |
|||
⚫ | |||
:attr('id', 'protected-icon') |
|||
} |
|||
:css{display = 'none', right = self._right} |
|||
⚫ | |||
return tostring(root) |
|||
end |
end |
||