Content deleted Content added
omit tracking categories on user pages |
turn off tracking in more namespaces |
||
Line 42:
local p = {}
local
local function
local thisPage = mw.title.getCurrentTitle()
if (thisPage.namespace == 2) -- User
or (thisPage.namespace == 3) or (thisPage.namespace == 5) -- Wikipedia talk
or (thisPage.namespace == 7) -- File talk
or (thisPage.namespace == 11) -- Template talk
or (thisPage.namespace == 15) -- Category talk
or (thisPage.namespace == 101) -- Portal talk
or (thisPage.namespace == 829) -- Module talk
then
trackingInThisNamespace = true
return true
end
return false
end
Line 97 ⟶ 105:
function p._portal(portals, args)
-- This function builds the portal box used by the {{portal}} template.
checkNamespace()
local root = mw.html.create('div')
:attr('role', 'navigation')
Line 115 ⟶ 123:
root:wikitext('<strong class="error">No portals specified: please specify at least one portal</strong>')
end
if not (
root:wikitext('[[Category:Portal templates without a parameter]]')
end
Line 132 ⟶ 140:
if (args.redlinks == 'yes') or (args.redlinks == 'y') or (args.redlinks == 'true') or (args.redlinks == 'include') then
-- if redlinks as been set to yes (or similar), add the cleanup category and then break the loop before the portal is removed from the list
if not (
root:wikitext('[[Category:Portal templates with redlinked portals]]')
end
Line 145 ⟶ 153:
if not (portallen == #portals) then
if #portals == 0 then
if (
return ""
else
Line 151 ⟶ 159:
end
end
if not (
root:wikitext('[[Category:Portal templates with redlinked portals]]')
end
|