Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Try This For Some Fun

Thread Tools
 
Search this Thread
 
Old 2nd Nov 2006, 01:26
  #1 (permalink)  
Thread Starter
 
Join Date: Jul 1999
Location: Warrington, UK
Posts: 3,839
Received 76 Likes on 31 Posts
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);

Last edited by MightyGem; 3rd Nov 2006 at 01:23.
MightyGem is offline  
Old 2nd Nov 2006, 05:47
  #2 (permalink)  
 
Join Date: Jul 2002
Location: Finland
Posts: 301
Likes: 0
Received 0 Likes on 0 Posts
Did nothing in Safari )
luoto is offline  
Old 2nd Nov 2006, 06:31
  #3 (permalink)  
 
Join Date: Oct 2006
Location: Sussex
Posts: 57
Likes: 0
Received 0 Likes on 0 Posts
Didn't do anything in IE7 either.
Mr Grumps is offline  
Old 2nd Nov 2006, 07:16
  #4 (permalink)  
 
Join Date: Mar 2002
Location: near an airplane
Posts: 2,801
Received 60 Likes on 44 Posts
nothing on Firefox 2 either.
Jhieminga is offline  
Old 2nd Nov 2006, 08:25
  #5 (permalink)  
 
Join Date: Oct 2006
Location: EGBJ Gloucester
Age: 40
Posts: 103
Likes: 0
Received 0 Likes on 0 Posts
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.

Last edited by robdesbois; 2nd Nov 2006 at 08:35. Reason: Strange problem...
robdesbois is offline  
Old 3rd Nov 2006, 01:24
  #6 (permalink)  
Thread Starter
 
Join Date: Jul 1999
Location: Warrington, UK
Posts: 3,839
Received 76 Likes on 31 Posts
Yes, very strange. If I go back to edit the post, that space isn't there.
MightyGem is offline  
Old 3rd Nov 2006, 06:13
  #7 (permalink)  
 
Join Date: Oct 2006
Location: Sussex
Posts: 57
Likes: 0
Received 0 Likes on 0 Posts
Works well after that space removal.
Mr Grumps is offline  
Old 3rd Nov 2006, 06:55
  #8 (permalink)  
 
Join Date: Jul 2002
Location: Northampton UK
Posts: 537
Likes: 0
Received 0 Likes on 0 Posts
All of the flying things still work if you click them (but took me a while to "catch" the Reply button!)

RC
rotorcraig is offline  
Old 3rd Nov 2006, 08:32
  #9 (permalink)  
Too mean to buy a long personal title
 
Join Date: Aug 2002
Location: UK
Posts: 1,968
Received 6 Likes on 4 Posts
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?
Globaliser is offline  
Old 3rd Nov 2006, 08:45
  #10 (permalink)  
 
Join Date: Oct 2006
Location: EGBJ Gloucester
Age: 40
Posts: 103
Likes: 0
Received 0 Likes on 0 Posts
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 . I can't really be bothered to work out the maths
robdesbois is offline  
Old 3rd Nov 2006, 08:55
  #11 (permalink)  
 
Join Date: Mar 2002
Location: near an airplane
Posts: 2,801
Received 60 Likes on 44 Posts
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.
Jhieminga is offline  
Old 3rd Nov 2006, 10:44
  #12 (permalink)  
Too mean to buy a long personal title
 
Join Date: Aug 2002
Location: UK
Posts: 1,968
Received 6 Likes on 4 Posts
Originally Posted by Jhieminga
If you go to say this page ...
OT, but that page is worth visiting for itself. I never thought I'd see the day when sex was being used to sell light aircraft. Whatever next - will A and B deploy bikini-clad hosts at Farnborough and Paris?
Globaliser is offline  
Old 3rd Nov 2006, 10:50
  #13 (permalink)  
 
Join Date: Oct 2006
Location: EGBJ Gloucester
Age: 40
Posts: 103
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by Globaliser
will A and B deploy bikini-clad hosts at Farnborough and Paris?
Fingers crossed!
robdesbois is offline  
Old 3rd Nov 2006, 19:42
  #14 (permalink)  
The Cooler King
 
Join Date: Feb 2004
Location: In the Desert
Posts: 1,703
Likes: 0
Received 0 Likes on 0 Posts
Heheheh!

That's great fun!

Now......how can I use it for mischief!

If you do it on the front page of pprune it looks great!
Farrell is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.