మాడ్యూల్:UserLinks/shared: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి en:Module:UserLinks/shared నుండి ఒక కూర్పు: తెలుగులోకి
set up a local blacklist system so that we don't categorise sandboxes or test case pages
పంక్తి 43:
end
error(message, level)
end
 
local localBlacklist = {
'/[sS]andbox$', -- Don't categorise sandboxes
'/[tT]est ?cases$', -- Don't categorise test case pages
}
 
local function currentTitleMatchesLocalBlacklist()
-- Return true if the current title matches any of the patterns in the
-- local blacklist table. Otherwise return false.
local title = mw.title.getCurrentTitle().prefixedText
for i, pattern in ipairs(localBlacklist) do
if title:find(pattern) then
return true
end
end
return false
end
 
Line 62 ⟶ 79:
-- Categorise all namespaces, but not blacklisted pages.
category = mCategoryHandler.main{all = category}
end
if category and currentTitleMatchesLocalBlacklist() then
category = nil
end
end
"https://te.wikipedia.org/wiki/మాడ్యూల్:UserLinks/shared" నుండి వెలికితీశారు