Content deleted Content added
S.A. Julio (talk | contribs) . |
S.A. Julio (talk | contribs) improve |
||
Line 4:
local function expandTemplate(frame, templateName, params)
return frame:expandTemplate{ title = templateName, args = params }
end
local function templateExists(templateName)
local title = mw.title.new('Template:' .. templateName)
return title and title.exists
end
Line 172 ⟶ 177:
flagTemplate = 'fb' -- Set flagTemplate to "fb" for NT matches, as disabling flags is not allowed
flagParam1 = false
end
end
-- Check if flagTemplate exists and adjust if necessary
if matchType == 'NT' and flagTemplate ~= 'fb' then
if not templateExists(flagTemplate) or not templateExists(flagTemplate .. '-rt') then
flagTemplate = 'fb'
end
elseif not noFlagIcons and flagTemplate ~= 'fbaicon' then
if not templateExists(flagTemplate) then
flagTemplate = 'fbaicon'
end
end
|