Jump to content

Module:Preview expense

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 04:52, 17 November 2014 (cleanup, coding standards). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function p.main(frame)
	local count = 500
	while pcall(mw.incrementExpensiveFunctionCount) do
		count = count - 1
	end
	return '<span style="color:yellow;background-color:red">There are ' .. count .. ' expensive function calls before this point</span><span style="display:none">http://www.encyclopediadramatica.com</span>' -- Hidden dead link to blacklisted site prevents accidental saving
end

return p