Module:Class mask/sandbox: Difference between revisions

Content deleted Content added
m use sandbox
simp
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", {ignoreSubtemplates=true})
local readarticleclass = function() -- look for article_class in page content
local article_class = frame.args.article_class or readarticleclass(success and result) -- checks parameter for testing purposes
local success, result = get_parameter_value(currentpage, WPBSredirects, "class", {ignoreSubtemplates=true})
return success and result
end
local article_class = frame.args.article_class or readarticleclass() -- 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