Try This For Some Fun
Copy the below and paste into your address bar and hit Return.
You'll need to go to another page to stop 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.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(O); |
Did nothing in Safari :()
|
Didn't do anything in IE7 either. :suspect:
|
nothing on Firefox 2 either.
|
It's trying to move the images no the current page around - although there's a fault in it, an additional space. This is the correct code:
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(O); Wow!! It works in firefox 2....that's amazing! EDIT: ok for some reason the page is changing it when it's posted. Copy it, but on the last line change 'se tInterval' to 'setInterval' by just removing that rogue space. Then it'll work, promise. |
Yes, very strange. If I go back to edit the post, that space isn't there. :confused:
|
Works well after that space removal. :cool:
|
All of the flying things still work if you click them (but took me a while to "catch" the Reply button!)
RC |
Very good!
Presumably this is related to the trick that some webpages have where a string of dangly stuff (or a clock, or whatever) follows your cursor around the page? |
Yes - they put some extra images on the page. At a regular interval, the images are then moved to be near the current mouse cursor position.
In this case, the script finds all images on the page, then uses some yucky trigonometry to make the circle whatever position it is :8. I can't really be bothered to work out the maths :yuk: |
Works ok, but you'll need a page with relatively small images to get a good result. If you go to say this page and paste the string in the address bar (removing the extra space of course) you'll see what I mean.
|
|
Originally Posted by Globaliser
(Post 2943919)
will A and B deploy bikini-clad hosts at Farnborough and Paris? :)
|
Heheheh!
That's great fun! Now......how can I use it for mischief! :E If you do it on the front page of pprune it looks great! |
All times are GMT. The time now is 08:16. |
Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.