Changes

Jump to navigation Jump to search

Module:Protection banner

358 bytes added, 14:20, 8 August 2014
add a "TOOLTIPFRAGMENT" parameter, as we were having the same issues with commas in tooltips as we did with INTROBLURB and INTROFRAGMENT; also move the config module name to a global variable so that it's more obvious when updating
-- Lazily initialise modules and objects we don't always need.
local getArgs, makeMessageBox, lang
 
-- Set constants.
local CONFIG_MODULE = 'Module:Protection banner/config'
--------------------------------------------------------------------------------
parameterFuncs.TALKPAGE = self._makeTalkPageParameter
parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter
parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter
parameterFuncs.VANDAL = self._makeVandalTemplateParameter
else
return self:_getExpandedMessage('tooltip-blurb-noexpiry')
end
end
 
function Blurb:_makeTooltipFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-fragment-expiry')
else
return self:_getExpandedMessage('tooltip-fragment-noexpiry')
end
end
function p.main(frame, cfg)
getArgs = getArgs or require('Module:Arguments').getArgs
cfg = cfg or require('Module:Protection banner/config'CONFIG_MODULE)
local parentTitle = frame:getParent():getTitle()
parentTitle = parentTitle:gsub('/sandbox$', '')
Anonymous user

Navigation menu