Anonymous

Module:Hatnote: Difference between revisions

From Melvor Idle
no edit summary
(Created page with "local p = {} -- Produces standard hatnote text -- function p.hatnote(frame) local args = frame:getParent().args local s = args[1] if not s then return '<strong class="error">No text specified for hatnote</strong>' end return p._hatnote(s) end function p._hatnote(s) local hatnote = mw.html.create('div') hatnote:wikitext(s) :addClass('navigation-not-searchable') :css('margin', '0.5em 2em 1em 2em') :css(...")
 
No edit summary
Line 4: Line 4:
function p.hatnote(frame)
function p.hatnote(frame)
local args = frame:getParent().args
local args = frame:getParent().args
local s = args[1]
local s = args[1] or frame[1]
if not s then
if not s then
return '<strong class="error">No text specified for hatnote</strong>'
return '<strong class="error">No text specified for hatnote</strong>'
2,875

edits