ചെക്ക് യൂസർമാർ, emailconfirmed, സമ്പർക്കമുഖ കാര്യനിർവാഹകർ, kiteuser, oversight, കാര്യനിർവാഹകർ, അപ്ലോഡ് സഹായി മേള തിരുത്തുന്നവർ
783
തിരുത്തലുകൾ
No edit summary |
(ചെ.)No edit summary |
||
| വരി 13: | വരി 13: | ||
local output = {} | local output = {} | ||
local | local expensiveCalls = 0 | ||
local maxExpensiveCalls = 101 -- Stay below the limit | |||
for _, grade in ipairs(grades) do | for _, grade in ipairs(grades) do | ||
local | local pageTitle = mainUrl .. "/" .. itemName .. "/" .. grade.suffix | ||
local titleObj = mw.title.new(pageTitle) | |||
table.insert(output, string.format( | |||
if titleObj and expensiveCalls < maxExpensiveCalls then | |||
if titleObj.exists then | |||
expensiveCalls = expensiveCalls + 1 -- Increment for each existence check | |||
table.insert(output, string.format( | |||
'<div style="text-align: center; padding: 0.75em; font-weight: normal; line-height: 1.15; font-size: 1.05em; margin-bottom: 0.2em; min-width: 120px; max-width: 250px; flex: 1 1 0px; margin-right: 1px;">' .. | |||
'<span aria-hidden="true" role="presentation">[[File:%s|45px|link=%s|frameless|center]]</span>' .. | |||
'[[%s|<b>%s</b>]]</div>', | |||
grade.file, pageTitle, pageTitle, grade.label | |||
)) | |||
end | |||
end | |||
end | end | ||
if | if #output > 0 then | ||
return string.format( | return string.format( | ||
'<div style="margin:8px 0px;background:#F1FFB5;padding-bottom:10px;border-radius:0px 0px 25px 25px;">' .. | '<div style="margin:8px 0px;background:#F1FFB5;padding-bottom:10px;border-radius:0px 0px 25px 25px;">' .. | ||
തിരുത്തലുകൾ