Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Sandbox/Hellknowz/Misc

From Wikipedia, the free encyclopedia
local p = {}

function p.rand(max)
	
	math.randomseed(mw.site.stats.edits)
	
	if (max <= 2147483648) then
		return math.random(max)
	else
		local ratio = max / 2147483648
		local r1 = math.floor(math.random(2147483648-1) * ratio)
		local r2 = math.random(math.ceil(ratio))
		return r1 + r2
	end
	
end

function p.random(frame)
	return p.rand(0 + frame.args[1])
end
 
return p