Changes

MyWikiBiz, Author Your Legacy — Tuesday September 09, 2025
Jump to navigationJump to search
661 bytes added ,  23:24, 15 July 2021
Pywikibot 6.4.0
local p = {}

local disambiguationTemplates = {
"[Dd]isambiguation",
"[Dd]isambig",
"[Dd]isamb",
"[Dd]ab",
"[Ss]urname"
}

function p.main(frame)
local getArgs = require('Module:Arguments').getArgs
local args = getArgs(frame)
title = args[1]
page = mw.title.new(title, 0)

if (not page) then
return "badtitle"
end

if (not page.exists) then
return "empty"
end

if (page.isRedirect) then
return "redirect"
end

local content = page:getContent()
if (content) then
for i, name in ipairs(disambiguationTemplates) do
if (content:match('{{%s?' .. name .. '%s?}}')) then
return "dab"
end
end
end

return "article"
end

return p

Navigation menu