Pages

Labels

funny (11) tech (10) games (9) video (8) web (8) pc (7) console (6) programming (6) wii (6) hack (5) music (3) construction (2) flash (2) hardware (2) ipod (2) javascript (2) ps3 (2) scale model (2) sport (2) wikipedia (2) ytmnd (2) zelda (2) DS (1) ajax (1) baltimore (1) europe (1) exercise (1) girls (1) nfl (1) nsfw (1) origami (1) playstation (1) ravens (1) sega (1) shuffle (1) skate (1) video games (1) xbox 360 (1)

Monday 8 January 2007

Cool (but useless) Javascript

So, I'm not a big fan of javascript (mainly coz it takes me forever to do anything that isn't alert('test');).
Yeah, so what if I suck at javascript? There's probably someone out there who has written the exact function or .js file that you need. See here if you need scripts.

Anyways here's something cool to do with websites, then get bored after a couple of minutes then not do it ever again. Just follow these steps (I promise there is nothing malicious about this code):

1. Open a website that has some images.
2. Delete the address from the address bar.
3. Copy and paste this code into the address bar:

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);

4. Press enter and enjoy.

Note: this works well on goolge image search, flickr, and amazon.

Thanks to digg for the heads up.

Also some guy on digg suggested to save the javascript as a bookmark (put the code in the address/location field). Then when you visit a webpage, load the bookmark to unleash the pain!!!!
Surely there's some security issue if you can just run js on a website from the address bar, kinda like SQL injection?

No comments: