This is an old revision of this page, as edited by Izno(talk | contribs) at 04:26, 27 December 2022(sync + module:List change). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 04:26, 27 December 2022 by Izno(talk | contribs)(sync + module:List change)
localp={}localtypes=mw.loadData("Module:Road data/RJL types")localcolumns={-- Constants for how many columns different list types should have.default=6,-- defaultexit=7,-- default + exit numberold=8,-- default + exit number + old exit number}localfunctionparameterParser(args)localkeysParam=args.keysifnot(keysParam)thenreturn{}endlocalkeys=mw.text.split(keysParam,",")table.sort(keys)returnkeysendfunctionp._jctbtm(args)localroot=mw.html.create()localcols=args.colorcolumns[args[1]]orcolumns.defaultrow=root:tag('tr'):tag('td'):attr('colspan',cols):addClass('jct-bottom'):wikitext(mw.getCurrentFrame():extensionTag{name='templatestyles',args={src='Module:Jctbtm/styles.css'}})if(args.convor'yes')=='yes'thenrow:wikitext("1.000 mi = 1.609 km; 1.000 km = 0.621 mi<br>")endlocalkey=parameterParser(args)ifkey[1]thencreateLegend(key,row)endlocalkeyParam=args.keyifkeyParamthen-- This is a deprecated parameterlocalpage=mw.title.getCurrentTitle()localpagename=page.prefixedTextrow:wikitext(string.format("[[Category:Jctbtm temporary tracking category|# %s]]",pagename))endrow:wikitext(args.notesorargs.key)-- If additional notes are provided, display them.if#row.nodes==0thenreturn'|-\n|}'elsereturntostring(root)..'\n|-\n|}'endendfunctionp.jctbtm(frame)returnp._jctbtm(require('Module:Arguments').getArgs(frame))endreturnp