NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Remove "Top broadcast" from newsfeed // @namespace https://openuserjs.org/users/Sauvegarde // @version 0.1 // @description Removes the "live" adverts from your feed // @author Sauvegarde // @match https://www.reddit.com/* // @icon https://www.redditstatic.com/desktop2x/img/favicon/favicon-32x32.png // @grant none // @updateURL https://openuserjs.org/meta/Sauvegarde/Remove_Top_broadcast_from_newsfeed.meta.js // @downloadURL https://openuserjs.org/install/Sauvegarde/Remove_Top_broadcast_from_newsfeed.user.js // @copyright 2021, Sauvegarde (https://openuserjs.org/users/Sauvegarde) // @license MIT // ==/UserScript== /* jshint esversion: 6 */ const bullshit = ['Top broadcast', 'Top livestream']; function parent(x, level) { let element = x; for(let i = 0; i < level; ++i) { element = element.parentElement; } return element; } function removeTopBroadcast() { [...document.querySelectorAll("h3")] .filter(e => bullshit.includes(e.innerHTML)) .map(e => parent(e, 7)) .forEach(e => e.parentElement.removeChild(e)); } window.setInterval(() => removeTopBroadcast(), 2000);