About

You're viewing one of 25,944 blog entries. Click here to read some more.

Other views

Recent Comments
Comments By...
Last 100 Entries
Read Chronologically
Random Entry
Random Image
View by Category
Mobile Edition


eXTReMe Tracker

Ad

Advertise Here



Monday, 23 October, 2006

Javascript In The Address Bar
(with comments)

Try this:

  1. Highlight the text below
  2. Press Ctrl+C
  3. Press Alt+D
  4. Press Ctrl+V
  5. Press 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);

Refresh the page to get back to normal. It works with IE and Firefox, and it works for any page that has images.

(via Ursi's Blog)


  1. By Perucho. Comment posted 23-Oct-2006 @07:44am:
    annoying but cool.
  2. By Anonymous. Comment posted 23-Oct-2006 @07:53am:
    I didn't try the javascript, but the shortcut Alt-D is a great tip! It automatically selects the entire text of the address bar in your browser.
  3. By Wayne. Comment posted 23-Oct-2006 @07:54am:
    That's really cool. I like that. Completely pointless. But cool.
  4. By Miss Cellania. Comment posted 23-Oct-2006 @08:03am:
    Nothing happened. Probably because I use a Mac. What's it supposed to do?
  5. By Anon. Comment posted 23-Oct-2006 @08:04am:
    I was mesmerized.
  6. By Toad. Comment posted 23-Oct-2006 @08:09am:
    I freaked out and hid under the desk.

    Things are better now, though.
  7. By . Comment posted 23-Oct-2006 @08:19am:
    It worked for me in Netscape 7.2.

    Cool - For a test project.
  8. By ~Q~. Comment posted 23-Oct-2006 @08:22am:
    I freaked out and found a toad under my desk.
  9. By . Comment posted 23-Oct-2006 @08:31am:
    "I don't do drugs, I am drugs."
    Salvador Dali
  10. By . Comment posted 23-Oct-2006 @08:37am:
    This looks really great at Bifurcated Rivets.
  11. By . Comment posted 23-Oct-2006 @08:57am:
    WOW!!!!
    You know there are not many people who could tell me to do several steps like that, and I would blindly follow. But I trust J-Walk.

    Well I did until that hurricane swept the monitor and all my papers off my desk and I had to run screaming Auntie Em! Auntie Em!.
  12. By Danny Kaye. Comment posted 23-Oct-2006 @09:25am:
    Yup...pretty cool.

    And I, too, like the "Alt-D" tip. That'a a keeper.

    Ya' got any more like that, J-walk?
  13. By . Comment posted 23-Oct-2006 @09:26am:
    Bleah! Stop the merry-go-round, I want to get off!
  14. By L.. Comment posted 23-Oct-2006 @09:55am:
    JW is right - it does look good at BR. But there again, I have to say that don't I?
  15. By . Comment posted 23-Oct-2006 @10:22am:
    Why not just copy the text and paste it in the address bar and go?
  16. By mmmark. Comment posted 23-Oct-2006 @10:28am:
    If you have a Mac:
    Select the text
    Command-C (Copy the text)
    Command-L (selects the text in the address box)
    Command-V (pastes the text)
    Return (or Enter)

    Scroll to the top of the web page to see what's going on.
  17. By . Comment posted 23-Oct-2006 @10:31am:
    Pretty cool on the Wheatstalk 2005 Gallery
  18. By Geeza. Comment posted 23-Oct-2006 @12:12pm:
    Running Internet Explorer 7.0.

    It did nothing.

    What was it supposed to do?
  19. By Ross. Comment posted 23-Oct-2006 @12:23pm:
    I pressed clrl+d, so ended up bookmarking some code, you need to make these instructions ross proof!

    Very powerfull though, cool stuff
  20. By Danny Kaye. Comment posted 23-Oct-2006 @01:25pm:
    It did something totally different here than on another site. Here, it just made the scrollbar spazz out. On my site it swirled all the pictures around.

    NOW it's cooler than I thought!
  21. By . Comment posted 23-Oct-2006 @01:57pm:
    You can also put that code in a bookmark on the toolbar - then it becomes a 'bookmarklet'. Click it on any page and it runs. Useless but fun.
  22. By . Comment posted 23-Oct-2006 @03:09pm:
    On my Mac running Safari, hitting the Reload button made it speed up.
  23. By chip. Comment posted 23-Oct-2006 @04:07pm:
    Danny Kaye, that's what I thought it was doing too--but I scrolled to the top and there were pictures flying about the place.
  24. By . Comment posted 23-Oct-2006 @04:23pm:
    Works on Opera, too, but instead of Alt+D use the F8 key to highlight the address bar.
  25. By Miss Cellania. Comment posted 24-Oct-2006 @03:10am:
    Thanks, mmmark! I now understand. You just paste this text into the address bar. So easy! And the pictures fly around the screen!
Commenting is not available in this weblog entry.