Sponsored by Dragon Age: Origins
See the new YouTube feature trailer for Dragon Age: Origins view!
youtube.com/DragonAge - EA presents BioWare's new dark fantasy epic Dragon Age: Origins. '9/10' from Game Informer.
142 Comments
- timewarrior, on 10/12/2007, -3/+70javascript: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);
- ani-pockdotnet, on 10/12/2007, -1/+56Since some people are having trouble doing this on their browsers, I made a video:
http://www.youtube.com/watch?v=MOHtuuvybqc
The first part shows what happens with a page from Google Image search. The second part shows what happens when you take a page with 350+ images.
And for those that want to do this:
1. Open a new window, with a page that has images.
2. PASTE THE FOLLOWING IN THE URL BAR AND HIT ENTER:
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);
3. Enjoy - tizz66, on 10/12/2007, -1/+35It works brilliantly on Google Images!
- theRIAA, on 10/12/2007, -0/+24does anyone else think its funny that like every other person optimizes the script?
- burke, on 10/12/2007, -21/+42http://duggmirror.com/,
- burke, on 10/12/2007, -3/+22Why does this always get dugg down? Try clicking the actual link! It goes to the same place as the expanded version!
- LiquidPenguin, on 10/12/2007, -0/+15Interesting. I just tried this on a number of different sites. The effect looks and works a lot better of the site has a bunch of images all relatively the same size. Digg works, but it's not a very interesting effect. eBay slows down the computer for some strange reason. Google is boring. Try it on Amazon, it looks quite good.
- Mambo, on 10/12/2007, -5/+20Anyone mind saying wtf this does? Sorry if I feel a little sceptical of pasting random code into my browser, from a site that I can't even read. Especially with the recent problems with FF and javascript.
- usherzx, on 10/12/2007, -0/+13@theRIAA
I would digg your comment.. but I'm having a little bit of trouble
you see.. I copied and pasted the javascript from up there.. and now my digg buttons are floating around every which way
:) - wphj, on 10/12/2007, -0/+13Do a google image search for "planet"
- freakofnature, on 10/12/2007, -3/+14u mean dugg? lol
- bengine, on 10/12/2007, -2/+13Try it with porn! One of those huge thumbnail sites or somehting, boobies flying everywhere!
- Beaver6813, on 10/12/2007, -2/+13Hey,
Basically this script funks up some web pages. Gets all the images and makes them all rotate in one big circle in the middle. it looks quite cool.
Ive tested on cnn.com, some flikr profiles and bbc.co.uk and it works well there.
EDIT: Tested on http://www.flickr.com/photos/snyder07/sets/72157594161942682/ pasted by someone above.
I think it works best on news sites, or sites with lots of different smaller thumbnails.
Go to your site, wait till it loads then paste the code from http://duggmirror.com/programming/Funky_JavaScript_works_on_all_websites_even_digg/ into your address bar and hit enter.
It doesn't work on lots of sites, but the sites above ive tested. Its just a bit of fun, no real educational value :p - idonthack, on 10/12/2007, -0/+10It makes all the images on the page swirl around in the top left.
- daonlyfreez, on 10/12/2007, -4/+14Sigh... This reminds me too much of my daily work...
1) Goto http://duggmirror.com/programming/Funky_JavaScript_works_on_all_websites_even_digg/
2) Copy the there presented JavaScript (that's NOT Java) there
3) Open a Notepad file (or any textfile), paste the JavaScript in, and assure yourself that it is ONE LINE
4) Goto a site with enough images, paste the JavaScript into the addressbar of your browser, and press enter
This is called a bookmarklet, or one-line JavaScript. You can save it as a bookmark, and invoke it from there. Well written bookmarklets work on a number of browsers. - LR2_, on 10/12/2007, -3/+12Wow, I didn't know duggmirror could do that.
- adolfojp, on 10/12/2007, -1/+8Works in Opera too. :-)
- Virak, on 10/15/2007, -1/+8javascript: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);
document.images is non-standard, and the positions/sizes need a unit, so I've fixed it up a bit. If it doesn't work for you, and you're not using IE, try this one. - vicaya, on 10/12/2007, -0/+7Modified to eliminate interference to existing javascript on pages:
javascript:{var R=0, x1=.1, y1=.05, x2=.25, y2=.24, x3=1.6, y3=.24, x4=300, y4=200, x5=300, y5=200, I=document.getElementsByTagName("img"), L=I.length; setInterval(function (){for(i=0; i-L; i++){var S=I[ i ].style; S.position='absolute'; S.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; S.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++},5); void(0)}
Save it as a bookmarklet (for example, clone a bookmark on the toolbar and modify the Location/url field in properties) and have fun with just one click.
The effect of the script can be cleared by a simple reload. - speaker219, on 10/12/2007, -0/+6Here is my modified version that asks you for a speed to fly the images at when you do it:
javascript:var speed=prompt(%22what speed for flying images? higher is slower, fastest and smoothest is 5%22); 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(%22img%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()',speed); void(0);
***and to pause it**** javascript:function A(){} - speaker219, on 10/12/2007, -1/+7Ha ha..... I just did it with div tags instead of img tags....
go here to see the results (and how to do it)
http://untitled1.ca/~charlie/ - daonlyfreez, on 10/12/2007, -2/+7Why are you digging me down? I see too many ignoramus postings...
- kalmi, on 10/12/2007, -1/+6If you know a little about JS, you can see that there is nothing malicious about it...
- speaker219, on 10/12/2007, -0/+4I think this looks pretty cool.
Go here: (firefox start page)
http://google.com/firefox/
and then use this modified code in 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.getElementsByTagName("font"); 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()',75); void(0); - Omar12, on 10/12/2007, -1/+5Nice. I guess its a new way to look at pr0n pics.
- vicaya, on 10/12/2007, -0/+4"does anyone else think its funny that like every other person optimizes the script?"
yeah, isn't open source great? :) - tehblacksheep23, on 10/12/2007, -4/+8Yes, what the hell is this?
And sorry about my last two comments, I'm having issues with the comment box. - inactive, on 10/12/2007, -1/+5Very cool
- daspacepirate, on 10/12/2007, -0/+3Psh, who needs all of these code-optimizing websites? Just get your code dugg and watch people optimize it for you In Real Time! ©
- Beaver6813, on 10/12/2007, -0/+3Yea :D (To remove the effect, refresh the page)
- gaoshan, on 10/12/2007, -0/+3Works in Safari. Try swapping out the img tag and replacing it with td or a... pretty cool to see the entire page go nuts.
- inactive, on 07/30/2008, -0/+3The site this linked to was in bulgarian. Bulgarians rule!
- speaker219, on 10/12/2007, -0/+3I implemented this into a greasemonkey script that moves around the "form" elements on the page so it floats around the search engine's input
titled "Make it hard to use a search engine"
check it out:
http://userscripts.org/scripts/show/5901 - gmallard, on 10/12/2007, -0/+3Kinda nice.
While it is running, bring up a CPU monitoring tool. That is interesting. - JacNet, on 10/12/2007, -2/+4Well, i just HAD to find a use for it :)
http://doodle-flash.co.uk/affiliates.php - tizz66, on 10/12/2007, -1/+3I can't get to the site to test it right now, but it sounds like you could add it as a bookmarklet too.
Add a new bookmark, and paste the javascript in the Bookmark URL field, and just click it when you need it. - rebelyell2k5, on 10/12/2007, -1/+3holy crapp do it one someones myspace page.
check it ouut. - stevenbao, on 10/12/2007, -0/+2It works well in Facebook, if someone has any Minifeed icons it looks like they're in their own orbity thing.
- vicaya, on 10/12/2007, -1/+3Improve script isolation slightly by localizing loop var i:
javascript:{var R=0, x1=.1, y1=.05, x2=.25, y2=.24, x3=1.6, y3=.24, x4=300, y4=200, x5=300, y5=200, I=document.getElementsByTagName("img"), L=I.length; setInterval(function (){for(var i=0; i-L; i++){var S=I[ i ].style; S.position='absolute'; S.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; S.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++},5); void(0)} - DeathfireD, on 10/12/2007, -0/+2someone make this into an extension and make it so we can turn it on by right mouse clicking and hitting a button!! This would make a great screen saver for FF.
- antdude, on 10/12/2007, -0/+2Is it possible to embed this JS code in a Web page for a prank or something? :)
- MasterScrat, on 10/12/2007, -1/+3Pause button?
javascript:function A() {} - Cruelapollo, on 10/12/2007, -0/+2You spin me right round baby!
- chmod, on 10/12/2007, -0/+2@tizz66
I must concur. That rocked my socks off. Swirling porn images will do that, I guess : ) - inactive, on 10/12/2007, -2/+4What is it about Javascript? It came along in the early 90's and was the dorkiest language then, wasn't good for anything but the never-ending dialog box trick. I ignored it except for web forms and took off learning ten other languages and come back to it now. Now it's this cool 'leet language that's powering Web 2.0, and every time I see it now it has some nifty trick it couldn't do before.
This is like if you came upon an object-oriented recursive-enabled lambda-functioning hot new language and you checked it out and it was the new version of Apple ][ BASIC. WTF? - Zipp425, on 10/12/2007, -2/+4Nope works just fine in IE 6 too...
- inactive, on 10/12/2007, -1/+3Yeah but a lot of people don't know any JS. Here's a movie of what it does:
http://www.youtube.com/watch?v=MOHtuuvybqc - inactive, on 10/12/2007, -0/+2Or to turn it into a clickable button for a site?
- computerbynar, on 10/12/2007, -1/+2all it needs is a pause button
-
Show 51 - 100 of 144 discussions



What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official