A Simple Bookmark Javascript to Get You Back to Work

A Simple Bookmark Javascript to Get You Back to Work

Eee058b3188ecfedf6381b6a529a2f4b360e8b3c?w=240&h=240&fit=crop
Taryn Williford
Nov 18, 2008

If you're having people over for the holidays (or even if you aren't), you might be deep into clearing up and cleaning out your space. And as if making your space look like it's ready for the pages of the Martha Stewart Living holiday issue wasn't enough to deal with, you've probably got a bit of cooking, gift shopping and gift wrapping to do in the coming weeks, too. And we know work and emails don't take a break. But to save your sanity and keep you on task while you're at the computer, we found this handy little Javascript that wants you to make sure that you really want to pull up Facebook...

As we type this, we're staring at a thin line of small gray text that runs across the top of our Firefox browser window. As if bookmark menus weren't enough to distract you in the yesteryears, now we're used to bookmark toolbars, which make it oh-so-easy to click on Facebook, YouTube or Twitter (three words we're looking at right above us right now and also three of the sites on CNET.co.uk's self-analyzing list: What do your favorite Web sites say about you?).

If you need to keep yourself from mindlessly clicking your saved bookmarks, try this Javascript: Go in and edit any problem bookmark. Say for the sake of argument it's a bookmark for this URL:

//www.facebook.com

Add a tiny bit of JavaScript to the beginning and end of the URL, like this:

if(confirm('Are You Sure?')){document.location='http://www.facebook.com';}

Voila! Now everytime you click on eBay or Wikipedia, you'll first be asked "Are you sure?" in a pop-up box, forever making sure that you truly want to be distracted before you click through to read all your friends' status updates.

[ Via ]

Created with Sketch.