Block a URL at browser level

5

4

Does anyone have a solution (that doesn't involve editing the hosts file) to block a particular URL from FireFox?

Basic back story is that I'm trying to discipline myself. I'm spending FAR too much time over at Server Fault that I want to genuinely block the site from my work PC so that every time I find myself flicking to it during work time I can't see it, but I'd like to be able to disable it during my lunch break. (So I only spend 40 minutes a day there, rather than 4 hours).

That said I don't want to block it at the router, nor for anyone else.

Mark Henderson

Posted 2009-08-31T22:01:29.467

Reputation: 5 956

Answers

10

The way I would do it is to install greasemonkey (if you don't already have it)

Then you could write your own script (right click the icon, add new user script). When it asks you where to apply it to, enter "http://*superuser.com/*"

The script contains:

window.location.href = "about:blank";

During your lunch-break you simply de-activate that script from greasemonkey

Vdex

Posted 2009-08-31T22:01:29.467

Reputation: 1 468

how would you do so for Google Chrome? – Lucas – 2015-08-08T01:33:18.507

@think123 Greasemonkey equivalent for Google Chrome is Tampermonkey :) – Deepak Kamat – 2016-04-24T17:24:33.707

Greasemonkey... I haven't seen this one before. I'll take a look. – Mark Henderson – 2009-08-31T22:23:02.137

Well, I got it working, but I've no idea what it wants by "namespace" so I entered junk, and it seems to work ;) – Mark Henderson – 2009-08-31T22:27:13.597

3

2 firefox extensions - leechblock and blocksite

josh

Posted 2009-08-31T22:01:29.467

Reputation:

2

Use AdBlock Plus to block URLs from the browser

user7963

Posted 2009-08-31T22:01:29.467

Reputation: 1 397

1

Block it using Parental Controls! :)!

ymasood

Posted 2009-08-31T22:01:29.467

Reputation: 631

He said at browser level, not system level. – Harley Watson – 2009-08-31T22:51:12.643

0

Use uBlock Origin browser extension for rich domain blocking level capabilities.

Mike

Posted 2009-08-31T22:01:29.467

Reputation: 435