I hate dev.to listicles!

Removes obnoxious/unwanted listicles from the dev.to feed and search

// ==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 <[email protected]> (https://b0ba.dev)
// @match        https://dev.to/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=dev.to
// @grant        none
// @license      MIT
// ==/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;
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址