Module:Class mask/sandbox: Difference between revisions

Content deleted Content added
rmv wrappers for now
m switch to underscore parameters
Line 203:
local currentpage = mw.title.getCurrentTitle().prefixedText
local WPBSredirects = {'WikiProject banner shell','WikiProject banner shell/sandbox','Bannershell','Multiple wikiprojects','Project shell','Scope shell','WPB','WPBS','WPBannerShell','WP Banner Shell','WP banner shell','WikiProjectBannerShell','WikiProjectBanner Shell','WikiProjectBanners','WikiProject BannerShell','WikiProject Banner Shell','WikiProject Banners','WikiProject Banners Shell','WikiProject Shell','WikiProject banner','WikiProject banner shell/redirect','WikiProject shell','WikiprojectBannerShell','Wikiproject banner holder','Wikiproject banner shell','Wikiprojectbanners','Wikiprojectbannershell','Wpb','Wpbannershell','Wpbsgclass'}
local success, result = get_parameter_value(currentpage, WPBSredirects, "class", {ignoreSubtemplatesignore_subtemplates=true})
local article_class = frame.args.article_class or (success and result) -- checks parameter for testing purposes
article_class = article_class and p._main{article_class, ignorenamespace=frame.args.ignorenamespace} or '' -- normalise if not false
if article_class == '' then -- article class does not exist, display quality class in project banner as normal
if local_class == '' then
local _, classparam = get_parameter_value(currentpage, WPBSredirects, "class", {ignoreBlankignore_blank=true, onlySubtemplatesonly_subtemplates=true})
if classparam == '' then -- no class parameters defined, display as globally unassessed
prefix = 'H' -- hide quality class in project banner