diff --git a/www/static/ooo.js b/www/static/ooo.js index f05f5ac..53ecacb 100644 --- a/www/static/ooo.js +++ b/www/static/ooo.js @@ -1,17 +1,12 @@ -var c = 255 -var x = 0 -function b() { - c -= 1; - document.body.style.backgroundColor = 'rgb(' + c + ',' + c + ',' + c + ')'; -} +var x = 0, y = 0; function m() { - x += 0.7 + x += (Math.random() >= 0.4 ? 1 : -1 ) * (Math.random() * 5); + y += (Math.random() >= 0.4 ? 1 : -1 ) * (Math.random() * 5); s = document.getElementById('search'); - s.style.left = x + 'px' - s.style.top = x + 'px' + s.style.left = x; + s.style.top = y; } window.onload = function () { - // setInterval(b, 500); setInterval(m, 200); };