Module:Class mask/sandbox: Difference between revisions

Content deleted Content added
use class_mask
No edit summary
Line 7:
local success, result = get_parameter_value(target, WPBSredirects, "class", {ignoreSubtemplates=true})
return success and result
end
 
local getclass = function(args)
local class = '¬'
if args.QUALITY_SCALE == 'inline' then
class = args.class
elseif args.QUALITY_SCALE == 'subpage' then
if mw.title.new(args.BANNER_NAME..'/class').exists then
local frame = mw.getCurrentFrame()
class = frame:expandTemplate{title = args.BANNER_NAME..'/class', args = args}
end
else
args.FQS = (args.QUALITY_SCALE == 'extended') and 'yes' or 'no'
args[1] = args.class
class = class_mask(args)
end
return class
end
 
Line 200 ⟶ 183:
local args = getArgs(frame,{removeBlanks=false, wrappers='Template:Class mask'})
return p.class_mask(args)
end
 
local getclass = function(args)
local class = '¬'
if args.QUALITY_SCALE == 'inline' then
class = args.class
elseif args.QUALITY_SCALE == 'subpage' then
if mw.title.new(args.BANNER_NAME..'/class').exists then
local frame = mw.getCurrentFrame()
class = frame:expandTemplate{title = args.BANNER_NAME..'/class', args = args}
end
else
args.FQS = (args.QUALITY_SCALE == 'extended') and 'yes' or 'no'
args[1] = args.class
class = class_mask(args)
end
return class
end