More actions
Created page with "local p = {} local function isHiddenOrUseless(id, ns) -- escludi roba tecnica/di sistema if id < 0 then return true end if ns.name == '' then return true end -- spesso non serve elencare Talk if ns.isTalk then return true end -- escludi namespace tipici di sistema (puoi togliere ciò che vuoi) local blacklist = { ["Special"] = true, ["MediaWiki"] = true, } if blacklist[ns.name] then return true end return false end function p.list(frame) local out = {}..." |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.list(frame) | function p.list(frame) | ||
local out = {} | local out = {} | ||
for id, ns in pairs(mw.site.namespaces) do | for id, ns in pairs(mw.site.namespaces) do | ||
-- escludo namespace tecnici/strani | |||
if id >= 0 and ns.name and ns.name ~= '' and not ns.isTalk then | |||
-- solo nome (testo), niente link | |||
-- | table.insert(out, ns.name) | ||
table.insert(out, | |||
end | end | ||
end | end | ||
table.sort(out) | table.sort(out) | ||
return table.concat(out, "\n") | return table.concat(out, "\n") | ||
Revision as of 09:25, 6 February 2026
Documentation for this module may be created at Module:Namespaces/doc
local p = {}
function p.list(frame)
local out = {}
for id, ns in pairs(mw.site.namespaces) do
-- escludo namespace tecnici/strani
if id >= 0 and ns.name and ns.name ~= '' and not ns.isTalk then
-- solo nome (testo), niente link
table.insert(out, ns.name)
end
end
table.sort(out)
return table.concat(out, "\n")
end
return p