Open main menu

Changes

Module:Transclusion count

88 bytes added, 20:51, 30 May 2023
m
Changed protection settings for "Module:Transclusion count": Highly visible template; requested at WP:RfPP ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
local namespace = mw.title.getCurrentTitle().namespace
if frame.args["demo"] and frame.args["demo"] ~= "" then
template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","")
elseif namespace == 10 then -- Template namespace
template = mw.title.getCurrentTitle().text
if namespace == 10 or namespace == 828 then
template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end
template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end
local index = mw.ustring.sub(mw.title.new(template).text,1,1)
local status, data = pcall(function ()
local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i)))
for name, count in pairs(data) do
if not name:find(':') then name = 'Template:' .. name end table.insert(list, {mw.title.new(name, "Template").fullText, count})
end
end
Anonymous user