What you're looking for is a keyword filter. This is the best way to filter any content because it can catch almost 100% of what you target. Eg. if you're addicted to the game Warcraft, you simply add that to the keyword, and that will be gone from the internet.
The best solution here is on Firefox version 56.0, using Procon latte filter. This extension no longer works on the later versions, and it's no longer on the addon store.
Good Basic Introduction to features on Windows
What sets it apart from other keyword based filters, is the accuracy, and minimal false positives. Plus its totally free and has password protection on addons page.
Some keyword blockers are overly aggressive. eg. if you set it to block the word, "bra", it will block "branding", "brain", "library" as well. This makes it pretty much unusable.
Instructions on how to set this up on Firefox Windows and Android
Firefox 56.0.2 download,
Windows
Android
Procon latte filter has been removed from Firefox addon webpage. You can download it directly from github.
Note: above will work on android too. Just open the install.html. This is workaround, details in stack overflow post.
This shouldn't be an accepted answer, OP is looking for content based filters. – tinker – 2019-03-15T07:59:17.550
I use OpenDNS to filter at home and you can filter on both domain names or on categories of content. Here's a screenshot of the filtering set-up: http://omeganerd.com/pics/lc/opendns.png I'm pleased with how it works.
– Dave Webb – 2009-08-18T07:56:29.583I've not heard of OpenDNS before but it certainly look worth a try – Swinders – 2009-08-18T08:04:14.623
+1 for ease and performance, though it depends on people reporting "bad" sites (categorising sites) -- unless there's some category nowadays to only allow well-known "good" sites? – Arjan – 2009-08-18T09:59:16.390