DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Favorites Fun!  (Read 4,337 times)

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Favorites Fun!
« on: January 09, 2007, 05:30 AM »
Here's a fun bit of code that will liven up any website, so long as the page you're viewing has graphics.

Code: (javascript)
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()',50); void(0);

Try it out by going to the smilies page and pasting the above code into your address bar and press enter! Whee!

Here's another neat trick! Add that code to one of your favorites and you can click on the favorite and it will activate the code on any page you're viewing! Double Whee!

Here's another trick! Enter in the code more than once (by clicking that favorite multiple times) and it will do even crazier things! Triple Whee!

Before:
Before.png

After:
After.png

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: Favorites Fun!
« Reply #1 on: January 09, 2007, 12:26 PM »
;D ;D Not that's a fun way to pick a smilie to a post!

Original address: https://www.donationcoder.com/forum/index.php?topic=6936.0