Module:Sensitive IP addresses/summary: Difference between revisions

Content deleted Content added
use yesno for the main header rule as well
simplify the mainheader option - better to let clients specify the header contents themselves
Line 31:
-- Add main header
if yesno(options.mainheader) then
local mainHeader = root:tag('tr'):tag('td')
mainHeader :attr('colspan', nColumns)
:wikitext(options.mainheader)
local mainHeaderText = '[[Wikipedia:Blocking IP addresses#Sensitive IP addresses|Sensitive IP addresses]]'
if yesno(options.rangecalculator) then
mainHeaderText = mainHeaderText .. ' ([http://www.subnet-calculator.com/cidr.php IPv4 range calculator] - [http://www.gestioip.net/cgi-bin/subnet_calculator.cgi IPv6 range calculator])'
end
if yesno(options.mainheaderrule) then
mainHeaderText = mainHeaderText .. '\n<hr style="margin: 4px 0;" />'
end
mainHeader:wikitext(mainHeaderText)
end