Module:Sandbox/Arccosecant/BouncyTest: Difference between revisions

Content deleted Content added
testing a thing
do this with the template now
 
(2 intermediate revisions by the same user not shown)
Line 2:
local p = {}
 
function p.call_from_entry(frameentry)
ret = ret .. return "<div style=\"position: fixed; left: 240px; top: 240px; z-index: 500; animation: x-ubox " .. math.random(5,7) .. "." .. math.random(0,9) .. "s linear infinite alternate, y-ubox " .. math.random(4,6) .. "." .. math.random(0,9) .. "s linear infinite alternate\">{{" .. cfg[math.random(#cfg)]entry .. "}}</div>"
end
 
function p.select_all(frame)
ret = ""
for _,ent in ipairs(cfg) do
ret = ret .. p._from_entry(ent)
end
return frame:preprocess(ret)
end
 
function p.select_rand(frame)
ret = ""
for i=1,frame.args[1] do
ret = ret .. p._from_entry(cfg[math.random(#cfg)])
ret = ret .. "<div style=\"position: fixed; left: 240px; top: 240px; z-index: 500; animation: x-ubox " .. math.random(5,7) .. "." .. math.random(0,9) .. "s linear infinite alternate, y-ubox " .. math.random(4,6) .. "." .. math.random(0,9) .. "s linear infinite alternate\">" .. cfg[math.random(#cfg)] .. "</div>"
end
return frame:preprocess(ret)