PDA

View Full Version : I bet you guys wont try this (javascript = fun)


Michael Hill
10-08-2006, 02:28 AM
Go to google image search, and search for whatever you want (kittens, dogs, whatever)

Then type this 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++}setInterv al('A()',5); void(0);

Gabe
10-08-2006, 02:48 AM
THAT IS SO COOL! :D :D :D

(one mistake: you left a space in between the word Interval. You spelled it Interv al.)

DCA Fan
10-08-2006, 03:30 AM
Wow that's crazy stuff.

Another good site to do this to is flickrleech.net

chris31
10-08-2006, 09:02 AM
Maybe its just me. But as a note, it moves so smoothly on FF, but in IE is TERRIBLE.

DonRotolo
10-08-2006, 11:25 AM
Wow, that's pretty wild. Makes me almost want to learn Javascript.

Don

Bill_Hancoc
10-08-2006, 11:26 AM
Very cool...i spent 10 minutes watching it on google Images and then decided i had other things to do

thegathering
10-08-2006, 11:31 AM
That is awsome :)

Elgin Clock
10-08-2006, 12:23 PM
Whoa... Freaky Fun!! Hmm.. gets idea. :D

Joe Matt
10-08-2006, 12:25 PM
Uh oh, Elgin has an idea.....

really cool, it works in Safari really well too!

Elgin Clock
10-08-2006, 12:30 PM
Uh oh, Elgin has an idea....

:D


Yeah, and it works on CD in this thread great too.
There are green reputation dots floating around EVERYWHERE!!!

Arkorobotics
10-08-2006, 12:38 PM
Lol, I saw this on digg. It's awesome!!

TheOtherGuy
10-08-2006, 02:06 PM
now that is cool! I had no idea javascript was so fun!

Noah Kleinberg
10-08-2006, 03:41 PM
Awesome...

This one's cool too:
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.tan(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.tan(R*y1+i*y2+y3)*y4+y5}R+=.5}setInte rval('A()',5); void(0);

Gabe
10-08-2006, 04:01 PM
Awesome...

This one's cool too:
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.tan(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.tan(R*y1+i*y2+y3)*y4+y5}R+=.5}setInte rval('A()',5); void(0);
Weird. The same mistake as before, with a space in between the word Interval. You have to manually fix the word Interval.

Anyhow, it seems that the game is on, to see who has interesting java script for the rest of us to entertain ourselves with. :)

Schnabel
10-08-2006, 04:07 PM
I think it is funny seeing all of the "O"'s float with it.

Qbranch
10-08-2006, 05:17 PM
Whoa... crazy... aah.. stop... eyes.. hurt... :yikes:

this makes me wanna learn java script too.... maybe later.

thanks for the fun,

-Q

DotCom
10-08-2006, 06:36 PM
Whoa! That is awesome! *is currently wishing that she knew javascript*

lol it works on other sites, too...

artdutra04
10-08-2006, 11:52 PM
Now I'm glad I know Javascript. :p

Here's a funny one I just made up that most of the ChiefDelphi community might enjoy.
(The video was from this thread (http://www.chiefdelphi.com/forums/archive/index.php/t-39103.html).) ;)

javascript:document.write('<html><body>'+document.documentElement.innerHTML+'<div style=position:absolute;top:0;left:0;right:0;botto m:0;width:100%;height:100%;background-color:#444;opacity:0.50;filter:alpha(opacity=50);-moz-opacity: 0.5>&nbsp;</div><div style=position:absolute;top:120px;left:120px;width :320px;height:240px;background-color:#fff;border:4px;padding:4px><b><span style=background-color:#fff;>The Great Krispy Kreme Challenge</span></b><br><embed src=http://www.chiefdelphi.com/misc/IRIKrispyKremeChallenge-48kbps.wmv width=320 height=240 autostart=1 showcontrols=1 type=application/x-mplayer2 pluginspage=http://www.microsoft.com/windows/windowsmedia/download/> </embed></div>');

SamC
10-13-2006, 01:11 AM
weird... every time i try and put this in my FF address bar it takes me to "quickbrowser" (site it searches on if it can't find the desired URL) any ideas?

Chris2
10-13-2006, 06:29 PM
This does absolutely nothing in my browser. I went to Google, typed in Dog and then pasted the javascript above into the address bar, and it did nothing.

Should the URL be

http://images.google.com/images?q=%2Bdog&hl=en&btnG=Search+Imagesjavascript: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.tan(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.tan(R*y1+i*y2+y3)*y4+y5}R+=.5}setInte rval('A()',5); void(0);

DotCom
10-13-2006, 08:28 PM
Delete

http://images.google.com/images?q=%2Bdog&hl=en&btnG=Search+Images

and just put the javascript code in the address bar. Then it should work...^_^

Chris2
10-16-2006, 05:53 PM
Nope, doesn't do a thing. I will attach a screenshot.

http://img524.imageshack.us/img524/8085/googjavamf9.th.jpg (http://img524.imageshack.us/img524/8085/googjavamf9.jpg)

chris31
10-16-2006, 06:17 PM
Nope, doesn't do a thing. I will attach a screenshot.

http://img524.imageshack.us/img524/8085/googjavamf9.th.jpg (http://img524.imageshack.us/img524/8085/googjavamf9.jpg)

View just 1 image. Such as (http://www.golden-dog.ru/Image/irzi/irzi1.jpg) then enter the JS code.

Chris2
10-16-2006, 06:26 PM
View just 1 image. Such as (http://www.golden-dog.ru/Image/irzi/irzi1.jpg) then enter the JS code.

Nope, viewing one image doesn't change anything. The javascript doesn't work in IE or FF.

chris31
10-16-2006, 06:29 PM
Nope, viewing one image doesn't change anything. The javascript doesn't work in IE or FF.

Post the JS code you are using.

artdutra04
10-16-2006, 06:42 PM
Nope, viewing one image doesn't change anything. The javascript doesn't work in IE or FF.I've tried it in Firefox 1.5, Firefox 2.0, Opera 9, and Internet Explorer 7 and it works in all of them. Make sure you check the last Interval in the code. Somehow it inserts a random whitespace in the middle of that, which causes the code to fail. Delete that extra whitespace in the middle of that word and this code should work.

P.S. If this still doesn't work, and although it may seem obvious, you need Javascript enabled to see this. Some firewalls that block ads/Flash/GIF animations may also have a Javascript disable feature. ;)

Chris2
10-17-2006, 11:11 PM
I've tried it in Firefox 1.5, Firefox 2.0, Opera 9, and Internet Explorer 7 and it works in all of them. Make sure you check the last Interval in the code. Somehow it inserts a random whitespace in the middle of that, which causes the code to fail. Delete that extra whitespace in the middle of that word and this code should work.

P.S. If this still doesn't work, and although it may seem obvious, you need Javascript enabled to see this. Some firewalls that block ads/Flash/GIF animations may also have a Javascript disable feature. ;)

Yes, interval had a space. The code worked when I removed the space.
Thanks!

Our robotics team's website looks kind of funny if you use this code.

Uberbots
10-17-2006, 11:54 PM
That was pretty creepy, but it definately added some jazz to a history project that i am doing research for =).