prorefa.blogg.se

Website blocker for productivity
Website blocker for productivity









website blocker for productivity

If you are on Windows you can right click on that file and open as administrator. Please note that only the user with administrator rights can modify this file. Let’s Modify The File…īefore starting the code, let’s try to modify the file and see if it works. If you are a Mac or Linux user, the location of that file is: /etc/hosts. The hosts file which I am talking about is present in C:\Windows\System32\drivers\etc\hosts if you use Windows. Something like this: 127.0.0.1 Now, whenever we try to open Facebook, it will be redirected to 127.0.0.1 (localhost) automatically. We can add the URL of any website and the URL of a website to which we want to redirect the former website to. The idea behind this blocker we are going to make is very simple. I ❤️ JavaScript! (source: ) The Background Idea You can make this script using any language of your choice which supports file handling. All you need is NodeJS installed on your system and a good text editor. Unlike my other tutorial articles, you won’t need any directory structure or a dev environment set up for this project. If you want to download the script directly, you can do so from here. Well yeah, quite easy! But come on, we are developers, we don’t do these things! When we need something, we develop scripts for it rather than using some random trick to do the work…right?!

#WEBSITE BLOCKER FOR PRODUCTIVITY SOFTWARE#

Just download some Chrome plugin, or rather any software which would do this for us. Yes, I know there are many easy methods to block any website. How about making a script which would block all these websites? The script allows you to use them only at some specific given hours of a day. Stop scrolling through your feed, and do something xD (source: )











Website blocker for productivity