Skip to content

Instantly share code, notes, and snippets.

@michaelotto
Created January 20, 2025 11:26
Show Gist options
  • Save michaelotto/0a3d185d1f8fab22e682b92c7368988a to your computer and use it in GitHub Desktop.
Save michaelotto/0a3d185d1f8fab22e682b92c7368988a to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Remove Trump
// @namespace http://tampermonkey.net/
// @version 2025-01-20
// @description Remove all Trump related articles from the Spiegel homepage
// @author michaelotto
// @match https://www.spiegel.de/
// @icon https://www.google.com/s2/favicons?sz=64&domain=spiegel.de
// @grant none
// ==/UserScript==
(function() {
'use strict';
var badSpans = document.querySelectorAll('article, div[data-area="debate"]')
badSpans.forEach((s) => {
if(s !== undefined && s.textContent.search(/trump/i) >= 0) {
//s.style.backgroundColor = 'rgb(0,255,0)';
s.style.display = "none";
}
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment