- Have you ever wanted to hide all the political posts from your Facebook feed without having to unfriend anyone or put your friends into groups? This post will show you how to hide political posts from Facebook while also giving you the option to temporarily toggle them on one post at a time.
I wrote this script after a receiving a few personal attacks on Facebook so I could quickly have a way to hide all the nonsense while maintaining my friendship with people from my past that have different political views. It currently is tailored to use a set of keywords that are geared towards blocking posts from the 2016 political season, but you can feel free to change these to your liking. Let’s dive into it!
This tutorial is for Chrome but this can also work in Firefox and any other browser that has the Tampermonkey browser extension…
How to Hide Political Posts from Facebook
- Download and install the Tampermonkey browser extension for your browser. A Google search for “tampermonkey chrome” or “tampermonkey firefox” etc. should do the trick.
- Once that’s installed, open up the Tampermonkey dashboard by clicking on the little Tampermonkey icon:
- Once you’re in the dashboard, click on the tab with the plus icon so you can create a new Tampermonkey script:
- Highlight all the code in the box below and delete it. Then replace it with the following code:
- Once you’re all done, click the little save/disk icon on the top left of the Tampermonkey window. Once you see a message at the top that says “Operation completed successfully” you can close the Tampermonkey tab.
- Now open up a Facebook tab (if you already have a Facebook tab open, go back to that tab and refresh it). You should now see political posts being hidden as you scroll through your news feed or any feed section on Facebook. It will tell you which buzz word it contained and who posted the post, and will allow you to click the hidden post to toggle it on in case you’re feeling temporarily political or you think it might have been hidden incorrectly.
Again, this is a simple tutorial on how to hide political posts from Facebook. This solution will not work perfectly for everyone because some people will not want to hide posts that contain the same words as I would like hidden, but it’s a good start for learning how to script for Facebook to improve your user experience. If you’re looking to tailor this to your specific needs, feel free to comment below with what you’re trying to accomplish. I’m always willing to help 🙂