Read with Formatting | Join TechSpot! (it's free) | Bookmark / Share this



This is kinda cool, try it out.

halo71
02-07-2007, 02:58 PM
Go to a website that has a lot of pictures, well really any site/page will work. I went to Google Images, typed in guitar. After page loads. Copy and paste the below code into the address bar and press enter. I am sure some of you have already seen this......



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);

SNGX1275
02-07-2007, 03:36 PM
Yeh, I saw it on Digg a while back. Pretty neat. There is another code that you can do that works with the text on the screen.

Edit:
Here this one works for 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.getElementsByTagName(%22font%22); 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)+%22px%22; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+%22px%22}R++}setInterval('A()',75); void(0);
And this for text and images: (be careful with this one)
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(%22*%22); 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)+%22px%22; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+%22px%22}R++}setInterval('A()',75); void(0);
Replace Math.cos with Math.tan for another effect.

And I'm probably going to regret posting this one because I'm sure some script kiddie is going to take this and run (but it does teach us to beware of screen shots of webpages).
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
Now anything you want to edit on the page is editable.

Ad
02-07-2007, 03:36 PM

rockybalboa
02-08-2007, 05:00 PM
LOL why would you want to do this? Its hurting my eyes!

halo71
02-08-2007, 05:03 PM
Why climb Everest??? ;)

cfitzarl
02-08-2007, 05:05 PM
That's really cool!

rockybalboa
02-08-2007, 05:06 PM
Ah, touché... maybe its time for me and my eyes to look away from the screen... might go watch a DVD :haha:

halo71
02-08-2007, 05:07 PM
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

That code does seems like it might be a little dangerous. You can edit but not save....

SNGX1275
02-08-2007, 05:13 PM
And I'm probably going to regret posting this one because I'm sure some script kiddie is going to take this and run (but it does teach us to beware of screen shots of webpages).I was implying that people could then screenshot it, and pass that off as true. You could fake announcement pages by Microsoft for example, lots of potential for abuse in the blogosphere.

halo71
02-08-2007, 05:14 PM
I was implying that people could then screenshot it, and pass that off as true. You could fake announcement pages by Microsoft for example, lots of potential for abuse in the blogosphere.


hummmmm...... :tapping fingers: .........

agi_shi
02-11-2007, 08:58 PM
WAIT - you can run javascript on the current page from the adress bar? Howcome I never knew that!?

Ad
02-11-2007, 08:58 PM

beef_jerky4104
02-18-2007, 02:37 AM
Thats really kewl.

hexxvoid
01-18-2008, 11:26 AM
Nice one!!

Woody17
03-11-2008, 03:45 PM
thats well good!

 Top Technology News

 Software Downloads

Copyright © 1998-2008 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.