Jump to content

Module:Class mask

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 03:13, 16 January 2015 (start replacement for Template:Class mask). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

-- This module implements [[Template:Class mask]].

local p = {}

local function getGrade(args, title)
	return nil
end

local function getDocWarning(title)
	if title.namespace == 10 and title.subpageText == 'class' then
		return mw.getCurrentFrame():expandTemplate{
			title = 'Class mask/doc warning'
		}
	end
end

function p._main(args, title)
	title = title or mw.title.getCurrentTitle()
	local docWarning = getDocWarning(title) or ''
	local grade = getGrade(args, title) or ''
	return docWarning .. grade
end

function p.main(frame)
	return p._main(frame:getParent().args)
end

return p