Fun with javascript

sly

Active Member
I thought this was pretty neat. Go to your favorite thread and then clear the address bar/URL bar. Now copy and paste this in there and enjoy the show.
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);
:happyfish
-mods, this is not a hack, trojan or any other malicious code...
[edit] Oh... I see now why it wouldn't work. For some reason the forum is adding a space in the text. I changed the color on the word "setInterval" and now it is not putting in that space. Anyway it works now. Just copy and paste it into the address bar on any website. Each one is different depending on how many pictures there are on each. :joy:
 

michaeltx

Moderator
the other thread was moved to the shark tank with a title as a SWF.com hack its not a good idea. what does this do anyway?
Mike
 

sly

Active Member
It takes the icons and the images on the web page and temporarily makes them swirl around your browser. It's completely temporary and is not malicious in any way. It is just a neat trick that you can do with javascript. To make it go away just hit the back arrow.
 

viper_930

Active Member
Hey Sly,
I put the script back into the original post. There was a few members that reported it as possibly suspicious so it was temporarily removed until we could figure out exactly what it is. Sorry about that.
It didn't work for me though, it just said error with the yellow triangle. :notsure:
 

michaeltx

Moderator
well in this day and age alot of stuff is malicious and or fishing for identity. I understand that its a fun thing but there are alot of people when you post something like this its the first thing to come to mind. the mods didnt see and delete it was reported to use as something that was suspicious so we took the action we thought neccesary. I hope that you understand that unless we know exactly what the code does and sometimes even then we have to delete it for saftey concerns not against the poster.
Mike
 

sly

Active Member
Originally Posted by ruaround
still nothing... it does stop the smilies from moving though...
You have to wait for this page to load... It works on any site, not just this one. Try google... Wait for the site to load and then when it's done, clear the address bar and paste the java code in there and hit enter.
If it doesn't work then it may be because you are on Linux or you have javascript disabled. Anyway, it's no big deal. I just thought it was neat. It takes all the animated icons and pictures on a page and causes them to swirl around on your browser.
Mods, I appreciate it. Maybe I should have explained it better. I pulled the script off of dslreports of which I am also a member. It just looked pretty cool and so I thought I would share it with people here in the aquarium. I understand why it may have made some people nervous... but all it does is take the images on the page and then change their x,y coordinates which simply positions them differently on the page. It is nothing that will harm anyone's computer, it just looks cool that's all. Like I said, just hit the back button to get it to go away.
***)
 

johnbob

Member
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);
There is a space between Interval in the first post. thats why it doesn't work. take that space out and it will work.
 

1journeyman

Active Member
That was pretty cool.
Sorry Sly. I'm the one that moved your first post for the other Sharks to look at. It wasn't meant as a slight towards you, just making sure everything was ok.
 

sly

Active Member

Originally Posted by ruaround
taking that space out did the trick!!! that was pretty kewl!!!

Glad you liked it... I don't know why that space is there. I have tried several times to edit the post and fix it but for some reason the forum is putting the space there. Anyway just delete the space so it says setInterval
without the space and it should work.
[edit] Ok, it's fixed now. I changed the color of the word and now the forum is not putting in that space. Enjoy! :jumping:
 

perfectdark

Active Member
LOL I just did it to MSN and Al Gore was floating around my screen. Then I took a Bazooka and blew it up. Now hes gone.....
 

fishycpa

Member
Originally Posted by PerfectDark
LOL I just did it to MSN and Al Gore was floating around my screen. Then I took a Bazooka and blew it up. Now hes gone.....
That would be very frightening! Not quite as bad as if Hillary was floating around...like the wicked witch of the west!
 
Top