Jump to content

Module:Preview expense

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Wnt (talk | contribs) at 18:07, 15 November 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p={}

function expend()
	mw.incrementExpensiveFunctionCount()
end

function p.main(frame)
   x = 0
   suck = true
   while ((x<1001) and (suck == true)) do
       suck = pcall(expend)
       x = x + 1
   end
   return '<span style="color:yellow;background-color:red;">There are ' .. (501 - x) .. ' expensive function calls before this point</span><span style="display:none;">http://www.encyclop<nowiki></nowiki>ediadramatica.com</span><!--- Hidden dead link to blacklisted site prevents accidental saving --->'
end

return p