// ==UserScript== // @name I hate dev.to listicles! // @namespace https://b0ba.dev/i-hate-dev-listicles // @version 0.11 // @description Removes obnoxious/unwanted listicles from the dev.to feed and search // @author Beckett Normington (https://b0ba.dev) // @match https://dev.to/* // @icon https://www.google.com/s2/favicons?sz=64&domain=dev.to // @grant none // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/446439/I%20hate%20devto%20listicles%21.user.js // @updateURL https://update.greasyfork.icu/scripts/446439/I%20hate%20devto%20listicles%21.meta.js // ==/UserScript== (function() { 'use strict'; let regex = /(([0-9]{1,3})|three|four|five|six|seven|eight|nine|ten|eleven|twelve|twenty|eigh|thir|four|fif|six|seven|eight|nine)(teen|ty)?( (more|extra))? (reasons?|must-have|weird|things?|gifs?|spectacular|fantastic|beautiful|tips|pieces|confessions|awesome|ludicrous|top|incredible|stages|movies?|films?|crazy|epic|easy|outrageous(ly)?|hilarous(ly)?|scar(y|iest)|\bof the\b|ways?|signs?|life ?(hacks?)|tweets|impossibl(e|ly)|productiv(e|ivity)|quotes|apps|tools|best|simple|facts|interesting|traps).*/ const purgeListicles = () => { document.querySelectorAll(".crayons-story__title").forEach((ele) => { let title = ele.textContent.toLowerCase(); if (title.match(regex)) { ele.parentElement.parentElement.parentElement.parentElement.remove(); } }); } document.onscroll = purgeListicles; })();