Module:Tile markers button

From RuneRealm Wiki

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:13, 17 October 2024 (Created page with "local p = {}; function p.main(frame) local args = frame:getParent().args local pageName = args[1] return p._main(pageName) end function p._main(pageName) local jsonContent = mw.loadJsonData(pageName) local resultsDiv = mw.html.create( 'div' ) resultsDiv:css({display = 'none'}) resultsDiv:addClass('tilemarker-div') resultsDiv:node(mw.text.jsonEncode(jsonContent)) return resultsDiv; end return p;"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Tile markers button/doc

local p = {};

function p.main(frame)
	local args = frame:getParent().args
	local pageName = args[1]
	return p._main(pageName)
end

function p._main(pageName)
	local jsonContent = mw.loadJsonData(pageName)
	
	local resultsDiv = mw.html.create( 'div' )
	resultsDiv:css({display = 'none'})
	resultsDiv:addClass('tilemarker-div')
	resultsDiv:node(mw.text.jsonEncode(jsonContent))

	return resultsDiv;
end

return p;