Autopatrolled users, Bots, Bureaucrats, Confirmed users, Interface administrators, Rollbackers, Administrators, Upload Wizard campaign editors
243
edits
(avoid using local variables to save table lookups per Jackmcbarn's suggestion, and because this will be cached with mw.loadData so performance of this function is not such a worry) |
m (31 revisions imported) Tags: Mobile edit Mobile web edit |
||
(25 intermediate revisions by 18 users not shown) | |||
Line 18:
-- values can be added as a string, or as an array of strings.
local
'demopage'
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end
for defaultKey, t in pairs(argKeys) do
Line 59 ⟶ 64:
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {
if canonicalName ~= nsname then
table.insert(mappings[nsname],
end
for _, alias in ipairs(ns.aliases) do
|