Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does RescueTimes blocking work?

I am a big fan and regular user of RescueTime, the time tracking application.

The service requires you to install a small program that runs in the background and keeps track of which programs and pages have focus at any given time.

Additionally, it lets you "Get Focused", which redirects all sites in a blacklist to their homepage, no matter which browser I use. That is, I see the homepage I visit, and am then redirected shortly after.

How is this block/redirect work? it seems to be browser independent, and I don't see any changes to my proxy settings, so it's not intercepting traffic that way.

Additionally, it is cross platform, and it looks like the client for both Mac OS and Windows works the same way.

Any ideas as to how this functionality is implemented?

like image 565
Joda Avatar asked Aug 24 '11 20:08

Joda


People also ask

Does RescueTime block sites?

You can use RescueTime to reinforce your focused intervals by blocking sites during each 25 minutes of focus.

Can RescueTime block apps?

RescueTime (Windows, macOS, Android) This works using data you're already providing RescueTime, which allows you to designate apps and websites as productive, distracting, or very distracting. In FocusTime, you can choose to block distracting apps or even just anything you haven't specifically tagged as productive.

How do I block a website to avoid distractions?

Limit. Limit is a Chrome browser extension that allows you to limit your time spent on distracting websites. To use Limit, simply select the website you find most distracting and choose a daily time limit. For example, you could limit yourself to ten minutes a day on Facebook, or half an hour a day on Duolingo.


1 Answers

For OSX:

What I found, they use Apple Script.

My assumption is they have an script running periodically, which gets which app is the one in the front. If it's a browser, they get the URL thru Apple Script again.

Example

# Google Chrome
tell application "Google Chrome" to return URL of active tab of front window
tell application "Google Chrome" to return title of active tab of front window

About get focused, I do not have the premium version. But, what I have seen is: it loads the website then, it redirects you. So, I presume they get the URL, then they determine if it should be blocked (looking the URL host into a list of invalid websites), then they redirect you... using Apple Script again.

like image 160
subzero Avatar answered Nov 12 '22 01:11

subzero