Anyone here seen this cool browser effect?

It is quite old I think but I don’t know if it’s come up on the SDMB

And feel free to be weary of doing it. It looks like the kind of thing a virus would do but it’s really just a clever bit of javascript.

What you do is paste it into the address bar of a particularly graphical website (lots of fairly small pictures) and press enter.

Be sure you have a reasonably good spec comp and that the website doesn’t have any huge-res pictures on it.

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 (Rx1+ix2+x3)x4+x5;DIS.top=Math.cos(R y1+i*y2+y3 )*y4+y5}R++}setInterval(‘A()’,5); void(0); (more)

Below is a link to what it does to this page I’m using to compose this message. As I type and things are swirling around the page still works perfectly.

How does one discover something like this? I mean it’s not like you would just click something or push the wrong button or mis-type an address for it to happen. That’s a long freakin’ chunk of code.

Well, my imediate guess was that someone who already knows alot about javasctipt and also knows a fair bit about how browsers work (I.e. the fact that javascript will work from the address bar) and thirdly is sh*t hot at mathematics put the three things together, tried it out, and then put it on youtube.

Play around with the numbers and you can change how fast in what way the pictures move.

As an example I’ve made x1=.01 and y1=.01

I think I’m missing something. How is that* not* the most annoying thing in the universe?

ON my browser, it repositioned everything, but it’s not moving around, the boar’ds graphics are just parked outside of the normal parking places. Shiira, OSX 10.4.10

It certainly CAN be annoying, but it’s cool to play with.

This one?

Nope, it just squishes stuff together a bit. Firefox 2.005 (Just call it 2.0, dammit!)

Well, I had important work to do today, so naturally I decided to waste some time debugging that code. I came up with this, which works for me in both IE and Firefox:

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 (Rx1+ix2+x3)x4+x5+‘px’;DIS.top=Math.cos(R y1+i*y2+y3 )*y4+y5+‘px’}R++}setInterval(‘A()’,5); void(0);

For you curious technical types: the ‘left’ and ‘top’ style properties should be strings, but the code was setting them to numbers. It appears that IE automatically converts them to strings, but Firefox just ignores them. Concatenating the units string (‘px’) to the numbers forces the conversion to take place.

Cute in an “okay, that was fun for a minute” way.

Neither the OP’s code nor the fixed code works for me, in IE or Firefox.

haha fun!

totally pointless, but fun nonetheless!

Mbossa’s code worked for me in Firefox. The original code works only in IE. It’s silly and of utterly no use, but it’s one of those things that’s neat for about five seconds, then you hit the refresh button to tell it to cut it the hell out so you can get your buttons back.

Im surprised, but while in their swirling glory, all the buttons are still functional!