cool java script
I just found a cool JavaScript.
Make a search with google images, for example:
http://images.google.com/images?q=horse
Then, in the Address control, replace the existing link with the following text:
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);
BTW, that works for any page. You can try it with the page you are viewing right now...
It looks like this:
[706 byte] By [
cilu] at [2007-11-20 2:01:58]

# 1 Re: cool java script
Funky! :D
# 2 Re: cool java script
Those crazy scripting junkies... ;) :D
cilu at 2007-11-9 13:01:31 >

# 3 Re: cool java script
Did you create this script, Cilu?? If so I can say you are a genius, not because you could just develope a simple math driven animation, but because you got the idea to develope it. :thumb:
# 4 Re: cool java script
This isn't going to crash my already fragile firefox browser is it?
Deniz at 2007-11-9 13:03:37 >

# 5 Re: cool java script
Did you create this script, Cilu?? If so I can say you are a genius, not because you could just develope a simple math driven animation, but because you got the idea to develope it. :thumb:
No, sorry to disappoint you but I'm not a "crazy scripting junky" ;).
This isn't going to crash my already fragile firefox browser is it?
I don't know, Deniz. Try it and see.
cilu at 2007-11-9 13:04:36 >

# 6 Re: cool java script
Nice one Cilu, the speed if reduced a bit guess would be better :D
# 7 Re: cool java script
Neat! It's nice to see those images swirl around. :D
# 8 Re: cool java script
I won't put the link here because it may not be appropriate, but thanks cilu for the code - I went to an adult website :blush: and tried it ... I couldn't stop laughing watching boobs and other bits flying about - LOLLOL!!!
Thanks again dude!
Best,
Nao
# 9 Re: cool java script
No, sorry to disappoint you but I'm not a "crazy scripting junky" ;).
I am a "crazy scripting junky!"
# 10 Re: cool java script
I am a "crazy scripting junky!"
I know. :D
cilu at 2007-11-9 13:09:37 >

# 11 Re: cool java script
Nice one. Bet it'd drive my dad nuts!
# 12 Re: cool java script
The funny thing is...it is so simple. All you have to know is SIN and COS and you are sent.
# 13 Re: cool java script
A way to stop it would be nice...
# 14 Re: cool java script
Click refresh. Or do you mean a button to stop the images while in motion?
# 15 Re: cool java script
I am a "crazy scripting junky!"
...a button to stop the images while in motion?
Go for it peejavery! Show us how it's done! :p
:D
Nao
# 16 Re: cool java script
I will do it tomorrow morning at work. I have a Mac and doesn't work on any browser on Mac. At work with my Windows machine I will modify it.
# 17 Re: cool java script
peejavery! I was kidding! lol
Seriously, don't do it unless you really want to! I know enough Javascript to prefer doing everything on the server side :blush: Javascript and the DOM never really grew on me.
Good luck! :thumb:
Nao
# 18 Re: cool java script
Okay, so I had a few seconds now and did a script that works with Mac OS X. Does it as well with PC? Just copy and paste into an active web page URL.
javascript:htmlcontent=document.body.innerHTML;mspeed=20;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++}curint=setInterval('A()',mspeed);document.write(htmlcontent+"<div style='position:absolute;top:0px;left:0px;'><input type='button' value='Start' onclick=\"curint=setInterval('A()',mspeed)\"><input type='button' value='Stop' onclick=\"clearInterval(curint)\"></div>");void(0);
# 19 Re: cool java script
Doesn't seem to work - I clicked your Start button and the browser is busy 'downloading' but I'm not sure what and I've been waiting for a minute now.
Unfortunately, I can offer very little insight as the reason!
Wish I had a mac ... :cry:
Nao
# 20 Re: cool java script
I tried it on IE 6 (build 2900 xpsp_sp2_gdr.050301-1519) and it doesn't work at all (nothing happens) No luck with Firefox too. My version of Firefox is 1.5.0.7
:sick:
Nao
# 21 Re: cool java script
Okay, so I had a few seconds now and did a script that works with Mac OS X. Does it as well with PC? Just copy and paste into an active web page URL.
javascript:htmlcontent=document.body.innerHTML;mspeed=20;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++}curint=setInterval('A()',mspeed);document.write(htmlcontent+"<div style='position:absolute;top:0px;left:0px;'><input type='button' value='Start' onclick=\"curint=setInterval('A()',mspeed)\"><input type='button' value='Stop' onclick=\"clearInterval(curint)\"></div>");void(0);
I tried in with IE6 and it doesn't work. Nothing seems to happen, except for that icon on the status bar where it says 'Done' which displays a exlamation mark on a yellow triangle, saying some error occurred.
cilu at 2007-11-9 13:20:49 >

# 22 Re: cool java script
Let's not instigate next year's cracks. I was kidding about the STOP button :)
# 23 Re: cool java script
Ah, the differences between Mac and PC.