5

I am looking for a browser add-on along the lines of Leechblock, to give a timeout from "timewasting" sites (e.g. Facebook, recreational parts of Stack Exchange etc.) for an adjustable amount of time after I close them.

I'll often find myself in a loop of, "Time to get some work done, I'll just check if there are any messages on Facebook before I close off, … and now I'll check Stack Exchange, … better check Facebook again …" etc.

  • I don't want to block them outright during certain timeslots -- I tend to get semi-important messages from family on Facebook (I don't use a phone).
  • And I don't want a fixed time per day. Sometimes it is helpful to me to spend a few hours browsing while I ruminate in the back of my head.
  • I want: Once closed, do not allow to reopen until X minutes later. Because at that point I have decided to stop browsing, so I want help keeping that decision.

If it also has these other features, then I don't mind. But it is the "Once closed, no reopening", that matters.

  • It should take a list of sites (with some wildcard support) and the timeout period (X) as parameters.
  • I don't care what browser it works with, I can easily change.
    • I would expect a browser-add on to be OS-agnostic, but if it comes to it, Windows matters to me more than Linux. But I would rather both.
  • NB: Leachblock may work for this now. I haven't used it in years; not sure on the feature set. – Lyndon White Apr 19 '16 at 8:16
2

TimeoutBlock Userscript

Currently hosted in this Github Gist
Once https://userscripts.org/ comes back online, it may move there.

I made, and released this product just for you.

Install

It is a Greasemonkey userscript. You'll need a userscript runner to use it. For Firefox you'll need to install Greasemonkey. It has only been tested in firefox. It might also work with TamperMonkey on other browsers, or with native userscript runners. I have not tested.

Click here to install.

Instructions

  • Add/Remove Sites by using @include and @exclude statements in the header.

    • By default it is set to just do facebook and academia stackexchange (just as an example)
    • For more details
  • Adjust Timeout by editing the variable timeout, at the top of the file (after the metablock).

    • It is specified in minutes.
    • default 30 minutes
    • For example: for a 1 minute 30 seconds you would set var timeout = 1.5;
  • When a block is engaged, the blocked page is hidden. and a remaining time number is set.

    • Note that this timer does not count down. Nor will the page auto-refresh when it reaches zero.
    • You have to refresh the page manually to update the countdown or to go to the site, it it has reached zero.
  • The state of the block, is set with a cookie, on each site where it is triggered.

    • the cookie is called "TimeoutBlock"
    • you can clear the block by deleting the cookies.
      • this is a feature
  • As an userscript, you can disable the block simply by turing off the userscript
  • The other parameter that can be set is the leeway.
    • This is how much time between leaving the page, then returning to it does not count. (this comes into effect with things like going to a subpage within the domain, which would be leaving the main page).
    • This is a variable set below the timeout
    • it is in milliseconds, initially 5000ms
      • depending on the speed of your internet connection you may need to increase it

Bugs

This may have bugs. It has had very little testing. I don't know how it preforms with the same site open multiple times. Or when blocking only a subdomain etc.

Please report bug in comments below (for now. Later it will be on userscripts or another hosting website)

Scifi Stack Exchange Being Blocked A nice side effect of how the text is displayed, is that it inherits the styling of the source site.

  • 1
    Interesting. Once activated, the script loads jQuery from Google and js-cookie from Cloudflare. Is there an impact in terms of (1) performance (2) privacy (think HTTP referer)? – Stéphane Gourichon Apr 22 '16 at 10:04
  • 1
    @StéphaneGourichon Interesting question. GreeseMonkey downloads the scripts (jQuery and js-cookie) that are required by the metablock, only when the script is installed as far as I can tell -- then caches them locally. I checked the folder as described in superuser.com/questions/253477 I did a quick double check with wireshark, that seemed to confirm, but I could have missed it (I'm not good at wireshare). So on that basis performance loss should be negligable, and there should be minimal privacy concerns. (I'm no expert though.) – Lyndon White Apr 22 '16 at 10:38
-1

There is couple of similar tools like LeachBlock.

My favorite so far is StayFocusd its a Chrome extension. It’s simpler than LeechBlock or Nanny, in that the user creates just one list of sites and limits the total time spent on those sites during each designated workday. Check those links out for more information.

Hopefully this was helpful

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.