Page 1 of 2

Funny Javascript Internet Trick

Posted: Sun Oct 29, 2006 3:49 pm
by RaVNzCRoFT
This is pretty funny. When a friend is on a website with pictures, such as this one or the results of a Google Image search, tell he or she to paste the following code into the address bar. Hell, even do it at the "post a reply" screen and watch the emoticons go for a ride. It's a javascript command that takes all the images found in the page's source code, and it spins them at the top of the screen. It's pretty fun[ny]. Try changing the settings for different results. For example, changing the x4 value to 1000 makes the image-spinning circle have a bigger radius. Experiment.

Code: Select all

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.getElementsByTagName("img"); 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)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0); 

Posted: Sun Oct 29, 2006 3:57 pm
by fishface617
i just tried it, lol, its awsome. good find

[edit] i just tried it on the post you own picture thread right above....:shock:

Posted: Sun Oct 29, 2006 3:58 pm
by Patrickssj6
Lol awesome.

I wish I could read java a bit better

Posted: Sun Oct 29, 2006 4:13 pm
by [cc]z@nd!
cool. did you code this yourself?

Posted: Sun Oct 29, 2006 5:14 pm
by a mammoth
Thats awesomeness in a can.

Posted: Sun Oct 29, 2006 5:28 pm
by dos mes
That's pretty awesome, nice find!

Posted: Sun Oct 29, 2006 5:35 pm
by a mammoth
How do you in bed this in a page? :twisted:

Posted: Sun Oct 29, 2006 5:38 pm
by fishface617
a mammoth wrote:How do you in bed this in a page? :twisted:
lol that would be awsome i wonder if it can be done

Posted: Sun Oct 29, 2006 6:08 pm
by Tural
Gametag told me about this a few weeks ago. Funny stuff.

Posted: Sun Oct 29, 2006 6:30 pm
by Grunt Rebel
That is so sweet! :D

Posted: Mon Oct 30, 2006 7:58 am
by Rallos
Saw this a day or two ago, still fun.
Right now I'm watching the rotating circle of faces.

Posted: Mon Oct 30, 2006 3:01 pm
by FleetAdmiralBacon
Sooo many fun things I can do with this....

Posted: Mon Oct 30, 2006 3:35 pm
by RaVNzCRoFT
I love this trick.



FAB, you're not the only one to notice it. That's the joke...

You tell someone to go to www.PenIsland.com, and they don't realize what they're going to.

Posted: Mon Oct 30, 2006 3:41 pm
by Tural
RaVNzCRoFT wrote:I love this trick.



FAB, you're not the only one to notice it. That's the joke...

You tell someone to go to www.PenIsland.com, and they don't realize what they're going to.
I believe 'tis .net >_>

Posted: Mon Oct 30, 2006 3:41 pm
by BEEF!!!
Try this one =P

Code: Select all

javascript:x=0;e=document.body;e.style.position="absolute";function rt(){e.style.top=100-(50*Math.cos(x*Math.PI/180))+"px";e.style.left=100+(50*Math.sin(x*Math.PI/180))+"px";x+=5};setInterval("rt()",50);void(0);

Posted: Mon Oct 30, 2006 3:46 pm
by Tural
Trippy

Posted: Mon Oct 30, 2006 4:15 pm
by RaVNzCRoFT

Code: Select all

javascript:x=0;e=document.body;e.style.position="absolute";function rt(){e.style.top=100-(50*Math.cos(x*Math.PI/60))+"px";e.style.left=100+(50*Math.sin(x*Math.PI/180))+"px";x+=100};setInterval("rt()",100);void(0);
Lollar @ seizure. :P

Posted: Mon Oct 30, 2006 4:46 pm
by a mammoth
Yes I am typing this as my page goes around.

From now on I will be reading all my pages in this rotation.

Thanks BEEF!!!!

Posted: Mon Oct 30, 2006 4:47 pm
by Dr.Cox
Funtastico.

Posted: Mon Oct 30, 2006 5:09 pm
by fishface617
heh, try both of them at once. :D

gets kinda laggy though....