Module:Road data/browsetable: Difference between revisions
Appearance
>MusikBot II m Protected "Module:Road data/browsetable": High-risk template or module: 10686 transclusions (more info) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) |
(No difference)
|
Latest revision as of 18:00, 16 August 2024
Documentation for this module may be created at Module:Road data/browsetable/doc
local p = {}
function p._browsetable(content, styles)
if not content then return nil end
local tbl = mw.html.create('table'):addClass('browse-table')
tbl:wikitext(content)
tbl:cssText(styles)
return mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Road data/browsetable/styles.css' }
} .. tostring(tbl)
end
function p.browsetable(frame)
local getArgs = require('Module:Arguments').getArgs
local args = getArgs(frame)
return p._browsetable(args[1], args.style)
end
return p