?

Log in

No account? Create an account
bookmarklets - The Mad Schemes of Dr. Tectonic [entries|archive|friends|userinfo]
Beemer

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

bookmarklets [Oct. 4th, 2006|10:18 pm]
Beemer
[Tags|]

I'm trying to think of something interesting to say about my day other than "Gha! So much email!" (I waded, hip-deep, into my inbox to try and wrest some semblance of organization from it with regard to prioritizing my manifold tasks before I hop on a plane and it all goes to hell next week), and didn't come up with much.

So instead, I will share something useful I figured out how to do today:

If you use Firefox, and you have the options set so that new windows are forced to open in a new tab instead, you can save the following javascript code as a bookmark:

javascript:(function(){ var dl,dll,i; function linkIsSafe(u) { if (u.substr(0,7)=='mailto:') return false; if (u.substr(0,11)=='javascript:') return false; return true; } dl = document.links; dll = dl.length; if (window.getSelection && window.getSelection().containsNode) { for(i=0; i<dll; ++i) { if (window.getSelection().containsNode(dl[i], true) && linkIsSafe(dl[i].href)) window.open(dl[i].href); } } } )();

And when you click on that bookmark (which you can put in your toolbar folder to make it all handy and accessible), it will open up all the links in your current selection in new tabs. Which is a lot easier than middle-clicking on 37 different links one after another.

[Note: you can't put javascript in an LJ entry, so I can't make the bookmarklet into a normal link that you can "bookmark link" on. Instead, you'll have to cut and paste the code into a bookmark; sorry.]

Hooray for bookmarklets! I got it from here, but I modified it a little, because the unmodified version has an annoying confirmation popup and will open up everything if there are no links in your selection, neither of which was behavior I thought desirable.
LinkReply

Comments:
[User Picture]From: emramesha
2006-10-05 05:31 am (UTC)
Very cool, thanks!
(Reply) (Thread)
[User Picture]From: ng_nighthawk
2006-10-05 07:51 pm (UTC)
Quite cool. Thanks!
(Reply) (Thread)
[User Picture]From: derbiser
2006-10-06 05:00 am (UTC)
Yay! This has already been terribly useful. Thanks!
(Reply) (Thread)
From: fufachew
2006-10-06 07:05 pm (UTC)
That, sir, is friggen awesome.

--3 weeks clean and sober from IE as the primary web browser.
(Reply) (Thread)