Skip to content

Instantly share code, notes, and snippets.

@rtsao
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtsao/80e2969bb1765431eef4 to your computer and use it in GitHub Desktop.
Save rtsao/80e2969bb1765431eef4 to your computer and use it in GitHub Desktop.
Timo.com alien fix #nostalgia
  1. Go to timo.com
  2. command+option+i (this opens the javascript console)
  3. Copy and paste in code the below then hit enter

var a=document.createElement("img");a.src="alien.gif";a.style.position="absolute";document.body.appendChild(a);setInterval(function(){if(Math.abs(ex-x0)>=10){x0+=Math.floor((ex-x0)*.1)}else if(ex!=x0){x0+=Math.abs(ex-x0)/(ex-x0)}if(Math.abs(ey-y0)>=10){y0+=Math.floor((ey-y0)*.1)}else if(ey!=y0){y0+=Math.abs(ey-y0)/(ey-y0)}imagesrc="";if(ex<x0&&x0-ex>Math.abs(y0-ey)/2){imagesrc="alien_l.gif";if(x0-ex<Math.abs(y0-ey)*2){if(ey<y0)imagesrc="alien_lo.gif";if(ey>y0)imagesrc="alien_lu.gif"}}if(ex>x0&&ex-x0>Math.abs(y0-ey)/2){imagesrc="alien_r.gif";if(ex-x0<Math.abs(y0-ey)*2){if(ey<y0)imagesrc="alien_ro.gif";if(ey>y0)imagesrc="alien_ru.gif"}}if(imagesrc==""){if(ey<y0)imagesrc="alien_o.gif";if(ey>y0)imagesrc="alien_u.gif";if(ex==x0&&ey==y0)imagesrc="alien.gif"}a.src=imagesrc;a.style.left=x0-32;a.style.top=y0},100)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment