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.