Created
February 14, 2023 20:25
-
-
Save mattolenik/cdd6277061e3025d65d53fd62f58ff1f to your computer and use it in GitHub Desktop.
Greasemonkey script to hide Facebook ads and BS, tested Feb 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide "Suggested post" on Facebook | |
// @include https://www.facebook.com/* | |
// @grant none | |
// ==/UserScript== | |
(function(){ | |
var watcher = function(){ | |
var bs=[...document.querySelectorAll('div[role="main"] div[data-pagelet="FeedUnit_{n}"]')].filter(div => div.innerHTML.includes('Suggested for you')).forEach(el => el.remove()) | |
setTimeout(watcher, 200); | |
}; | |
watcher(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment