Last active
October 29, 2020 23:02
-
-
Save Beyarz/6d7553a4eb19db2d16c73fb64380c158 to your computer and use it in GitHub Desktop.
Get rid of all the articles from the sports category on aftonbladet.se
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
// ==UserScript== | |
// @name Aftonbladet sportfilter | |
// @description Filter out sport related articles | |
// @match https://*.aftonbladet.se/* | |
// ==/UserScript== | |
window.addEventListener('DOMContentLoaded', () => { | |
//let x = document.getElementsByClassName('abTheme-sportbladet') | |
let x = document.querySelectorAll('[href^="/sportbladet"]') | |
for (let z=0; z <= x.length - 1; z++) { | |
console.log(`[${z}] Removed: ${x[z]}`) | |
x[z].remove() | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment