Annoying Window of dooom

[Total: 0    Average: 0/5]

This will resize the window and move it away from your mouse.

Head Code:

<script language="javascript">
var x = Math.round(Math.random() * 300) + 1;
var y = Math.round(Math.random() * 300) + 1;
var sly = 0;
var slx = 0;
var ang = (Math.round(Math.random() * 4) * 90) + 45;
var speed = 10;
document.onmousemove = fgf;

function fc()
{
  window.focus();
}

function fgf()
{
  mx = event.x+document.body.scrollLeft;
  my = event.y+document.body.scrollTop;
  mx = 50 - mx;
  my = 50 - my;
  if(Math.abs(mx) >= Math.abs(my))
  {
    my = 0;
  }
  else
  {
    mx = 0;
  }
  if(mx >= 0 && mx != 0)
  {
    mx = 1;
  }
  else
  {
    if(mx != 0)
    {
      mx = -1;
    }
  }
  if(my >= 0 && my != 0)
  {
    my = 1;
    if(my != 0)
    {
      my = -1;
    }
  }
  slx = mx;
  sly = my;
  if(slx == 1)  {ang =  45;}
  if(slx == -1) {ang = 225;}
  if(sly == 1)  {ang = 315;}
  if(sly == -1) {ang = 135;}
  speed += 3;
}


var d = 0;
var key = new Array();
document.onkeydown = kd;
document.onkeyup = ku;


function ku()
{
  key[event.keyCode] = 0;
}

function kd()
{
  key[event.keyCode] = 1;
  /* 37=left arrow | 32=space | 13=enter */
  if(key[37] == 1 && key[32] == 1 && key[13] == 1);
  {
    d = 1;
  }
}

function gj()
{
  var _parms='width=5,height=5,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, pageXOffset=-200';
  if(d == 0)
  {
    window.open(document.location.toString(), '', _parms);
    window.open(document.location.toString(), '', _parms);
    window.open(document.location.toString(), '', _parms);
  }
}
function g()
{
  self.resizeTo(100, 100);
  self.moveTo(Math.round(Math.random() * 400), Math.round(Math.random() * 400));
  move();
}

function move()
{
  speed -= 0.18;
  if(speed <= 0) {speed = 0;}
  for(var f = 0; f <= speed - 1; f++)
  {
    if(x >= screen.width - 100 || x <= 0)
    {
      ang = 180 - ang;
      if(ang <= -1) {ang += 360;}
    }
    if(y >= screen.height - 100 || y <= 0)
    {
      ang = 360 - ang;
    }
    angle();
    x += slx;
    y += sly;
  }
  window.moveTo(x, y);
  setTimeout("move()", 0);
}

function angle()
{
  if(ang >= 360) {ang = ang - 360;}
  if(ang <= 0)   {ang = ang + 360;}
  if(ang == 45)
  {
    sly = -1;
    slx = 1;
  }
  if(ang == 90)
  {
    sly = -1;
    slx = 0;
  }
  if(ang == 90 + 45)
  {
    sly = -1;
    slx = -1;
  }
  if(ang == 180)
  {
    sly = 0;
    slx = -1;
  }
  if(ang == 180 + 45)
  {
    sly = 1;
    slx = -1;
  }
  if(ang == 270)
  {
    sly = 0;
    slx = 1;
  }
  if(ang == 270 + 45)
  {
    sly = 1;
    slx = 1;
  }
  if(ang == 0 || ang == 360)
  {
    sly = 1;
    slx = 1;
  }
}
</script>

Body Code:

<!--put evil text below -->
<div style="position: absolute; top: -1;"><font size=1>HA HA<br>YOU CANT AVOID<BR>THE EVIL WINDOW!</font></div>
<!--put evil text above -->

Times Viewed: 5

Leave a Reply

Your email address will not be published. Required fields are marked *