Jump to content

Module:Sandbox/Ahecht/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ahecht (talk | contribs) at 16:58, 21 March 2018 (update). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}

local function _main(args)
	return true
end

function p.main(frame)
	local mwSite, mwSiteStats = '', ''
	for k,v in pairs(mw.site) do if type(v) == 'string' then mwSite = mwSite .. '\n*' .. k .. ': ' .. v end end
	for k,v in pairs(mw.site.stats) do if type(v) ~= 'function' then mwSiteStats = mwSiteStats .. '\n**' .. k .. ': ' .. v end end
	return 'mw.site: ' .. mwSite .. '\n*mw.site.stats: ' .. mwSiteStats
end

return p