Skip to content

Instantly share code, notes, and snippets.

View rtsao's full-sized avatar

Ryan Tsao rtsao

View GitHub Profile
@rtsao
rtsao / gist:80e2969bb1765431eef4
Last active August 29, 2015 14:04
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(exMath.abs(y0-ey)/2){imagesrc="alien_l.gif";if(x0-exy0)imagesrc="alien_lu.gif"}}if(ex>x0&&ex-x0>Math.abs(y0-ey)/2){imagesrc="alien_r.gif";if(ex-x0y0)imagesrc="alien_ru.gif"}}if(imagesrc==""){if(eyy0)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)