This file contains 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
const hideAds = () => { | |
document.querySelectorAll('[role="feed"] [data-pagelet]').forEach(el => { | |
let spEl = el.querySelector('span') | |
if (spEl && spEl.innerText == 'Suggested for you') { | |
el.style.display = 'none' | |
} | |
}) | |
var sponsoreds = document.evaluate("//span[contains(., 'Sponsored')]", document, null, XPathResult.ANY_TYPE, null ); | |
var sponsored = sponsoreds.iterateNext(); | |
while (sponsored) { |