Thursday, January 11, 2007

kiwi cloak: a quasi-coercive anti-websurf-procrastination tool

kiwi cloak
(locked out of jfw until the top of the next hour)

Web-based procrastinators: Lucy and I modified a script by Gina Trapani that was posted on Lifehacker. That program, called Invisibility Cloak, would allow you to specify sites that your browser would not let you visit until after a certain time of day.

While a fine idea, it's not consistent with how I wanted to rein in certain irksome compulsions of my own (e.g., GMail, Blogger, Bloglines). Instead, what I wanted was a program that would only let me check GMail and other distracting sites for a short period at the beginning of each hour. That is, I wanted a software solution that would help thwart a certain tendency toward mindless alt-tabbing self-distraction. After modifying the Invisibility Cloak script to do this, we couldn't think of a good name for it, so we're calling it Kiwi Cloak, in honor of a mysterious fruit/bird/nation fondness of Lucy's.

If you already know how add-ons for Firefox with Greasemonkey works, just right-click here to install. You can customize the settings (default is a 10 minute window from 6am to 11pm) and the excluded sites within Greasemonkey after installation.

Otherwise, how to use it:
1. Use Firefox. You should be doing this anyway.

2. Install Greasemonkey for Firefox. You should do this anyway if you use Firefox, which you should be doing.

3. Download this script.

4. Modify it to set the desired length at the beginning of the hour (default = 10), the desired window during the day when the restriction is on, (default 6AM - 11PM), and whether or not you want it to work on the weekends (default = yes). You can also set the particular sites you want to be kept from impulsively surfing. You can also this file in Greasemonkey by clicking on the monkey-face icon at the bottom of Firefox, choosing "Manage User Scripts...", choosing "Kiwi Cloak", and then either hitting the Edit button or changing the Included Sites list.

5. Go to "Open File..." in Firefox, and open the file. Click the Install button.
Sure, you can disable the script or disable Greasemonkey, etc., which is why it is only quasi-coercive. However, I've been using it and have found it genuinely effective and not something I try to thwart, since I know I should be able to wait until the top of the hour to check my e-mail. More generally, I'm optimistic that it can help lessen the habit of mindlessly clicking my way into distraction.

33 comments:

Anonymous said...

This is an excellent idea, but are you someone who can wake up in the morning and actually wait until the top of the hour to check your email? What if you woke up at 7:11am and had to wait until 8am? I'd have to read the NYTimes before email, have caffeine before email, work out before email... maybe even shower before email. I think I'll just install this on my office computer.

Thanks for the tip!

jeremy said...

Sure, although you can set it so that it doesn't start locking you out until 9am. And you can always disable Greasemonkey if you just absolutely have to check e-mail.

Anonymous said...

You two are teh brilliant.

Anonymous said...

"if you just absolutely have to check e-mail"

Are you implying that I, as Anon 8:23, am the only one that into my email? Please tell me I'm not alone.

I did notice the ability to change the time after I'd posted. I should have read more carefully.

Anonymous said...

thanks for sharing this! are you taking additional requests?

how about a little tool that forces one to exercise by freezing one's whole computer up for 45 minutes during which time one must go to the gym, take a walk, or use one's eliptical trainer before you can return to work? that's what i need.

jeremy said...

JT: I'm surprised a program like that doesn't exist, actually, but you could also just put your computer on some kind of power strip mounted inside a lock box.

Anonymous said...

Do you read email in order received, or most recent first? I'm trying to figure out how one might optimize receiving a response from you. Should I send my note while I know you can access GMail or should I send it at 11 mins past the hour so it's among the first you hadn't checked (assuming you got to all unread messages during the previous interval) or perhaps at hour 59? Hmmm...

Anonymous said...

i like it. And i wanted to tell you that, but i had to turn it off to do so - which was weird - or i could have waited. No dice. Next i need something like this for AppleMail, since i haven't migrated to web-mail entirely, just yet.

Anonymous said...

Your famous.....kiwi cloak now on lifehacker

Anonymous said...

Hi, nice idea, have taken and started hacking on it. Note there is a coding error. The '&' in the big if statement towards the bottom should actually be '&&' (you mean logical and not bitwise and).

You can also simplify the test at the end by moving things around, this is IMHO easier to understand although the formatting might be somewhat broken below

if (its_the_weekend == false || cloak_off_weekends == false) {
var mins = tstamp.getMinutes();
var hrs = tstamp.getHours();
if (mins >= surf_time_before && hrs >= day_begin && hrs <= day_end) {
var readable_time = 60 - mins;
var b = (document.getElementsByTagName("body")[0]);
b.setAttribute('style', 'display:none!important');
alert("You know you are supposed to wait for "+ readable_time + " more minutes!");
}
}

jeremy said...

Anon 12:52pm: e-mail me if you don't mind being non-anon; I'd like to ask you something about your code, but don't want to colloquy in my comments section.

Anonymous said...

Does this work with Flock?

Anonymous said...

great idea, but ran into a small problem. with this script loaded and working, i went to send the link around about it, which i forgot launched gmail via the webmailcompose ext. this then put me in a loop of kiwi cloak warning me about gmail, but then webmailcompose or gmail reloading the page, on and on and on, until finally i hit the top of the hour. thankfully i started it at 3 minutes to the hour, since it wouldn't let me change tabs or close the tab or anything else.

any chance you can trap for that?

Anonymous said...

Yup, Gmail problem for me, too, it basically locks down Firefox. I've disabled it for now...too bad, cause it's a nice idea.

Anonymous said...

I have the same problem - it doesn't stop a blocked page from loading (or maybe it doesn't stop the AJAX goodness), so I had to kill firefox, restart and disable the script.

I'd love to use a version that didn't cause this problem - a great idea! :)

Lucy said...

If you hit stop while the page is trying to load, you can disrupt the cycle.

JT, you could hook your computer up to a treadmill-powered generator :)

Anonymous said...

Thanks, I need this. I have a suggestion for a name (not too cute, I hope): since this is an anti-procrastination aid, how about "The Anticrastinator" or just "anticrastinator"?

Anonymous said...

Lucky me! I'm sufficiently non-techy to be capable of this tiny step in the right direction - maybe in 6 months time when I'm a little higher on the evolutionary scale of techiness I might qualify.
Cheers

Anonymous said...

How do you edit the script? Open it up in notebook? Thanks

jeremy said...

You can open it in Greasemonkey if you go to Manage User Scripts. You have to choose a text editor, so choose Notepad. Or you can download it and open it in Notepad.

Anonymous said...

this is a real interesting idea for staying on task, but i find that i (and probably others) would be far better off with a script that allowed 10 minutes of work then 2 mins of play repeating 5 times for a total of 10 minutes per hour. This is probably more effective because i know i cant stay focused for 50 mins straight.

if anyone makes a script like this please email it to me, RH.incorporated[at]gmail[dot]com
-thx in advance!

Jane Dark said...

Is there anything special you need to do to get it going? I want the default settings; so I didn't change the script at all -- but though I installed it, and though Greasemonkey is active, I'm not getting any sign that it's working.

Thanks...

Unknown said...

for 'step 5' where can i find the file in firefox to open?

thanks a lot.

Luis Villa said...

Tip: I replaced the 'alert' with window.location = 'url for my gtd tool', which makes the page just redirect to my gtd tool.

I find this much more useful than the alert- I still get reminded that I'm procrastinating, and it immediately takes me to a list of things I'm supposed to do instead of procrastinate.

Devan said...

I've updated the script so that it now functions across hours (ie, you can make the window go from :55 to :05). It will also no longer have problems with midnight (for all you night owls). Finally, I cleaned up the "minutes left" errors.

You can find the updated script (as "Super Kiwi Cloak") at http://userscripts.org/scripts/show/8448 .

Anonymous said...

I've loaded the script, but it doesn't work. Nothing is getting blocked. Any ideas what might cause this?

Anonymous said...

It doesn't work for me either... After ten minutes of surfing I can still surf.

Karen said...

mine doesn't work either - i didn't change any of the default settings, and i can see the little monkey. he says it's enabled. but i can still go to any web page i want (unfortunately). help?

t-dawg said...

not working for me either!

Unknown said...

it's not working for me either! help! i love the concept!

Unknown said...

kiwi cloak have many helpful tools. and all the idea that is introduced in the blog come to support what i heard about it.
very nice blog!!

buy viagra

Unknown said...

Great post! thanks for sharing!
Viagra Generico

J said...

Thank you, this is great!

It wasn't working for me either but I was able to fix it. In the code at the very end the line "alert("You know..." was split over two lines. I changed it so it was all on one line and now it works.