Module:Sandbox/BrandonXLF/scripts

From blackwiki
< Module:Sandbox‎ | BrandonXLF
Revision as of 08:22, 12 May 2020 by blackwiki>BrandonXLF
Jump to navigation Jump to search

local getArgs = require('Module:Arguments').getArgs local p = {}

function p.variables (frame) local args = getArgs(frame) local i = 1

local out = '

Variables

Optionally, add any of the code snippets below to the JS file you installed the script in (eg. your common.js file) to change the settings for this script. For best compatibility, put them above the code that is used to load the script.
    '

    args['v1'] = (args['v'] or args['v1']) args['d1'] = (args['d'] or args['d1']) args['e1'] = (args['e'] or args['e1']) while args['v'..i] do local var = 'window.'..args['v'..i]..' ='..(args['e'..i] and ' '..args['e'..i] or )..';' var = var..(args['d'..i] and ' – '..args['d'..i] or )

    out = out..'
  • '..var..'
  • ' i = i + 1 end return out..'
'

end return p


-- {{g7}}