2024-01-25

スパム非表示

Tempermonkey にぶちこめ

// ==UserScript==
// @name         増田ミュート
// @namespace    http://tampermonkey.net/
// @version      2024-01-25
// @description  try to take over the world!
// @author       You
// @match        https://anond.hatelabo.jp/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=hatelabo.jp
// @grant        none
// ==/UserScript==


function sleep(ms) {
    function timeout(resolve) {
         setTimeout(resolve, ms);
    }

    return new Promise(timeout);
}

(async function() {
    await sleep(100);

    const muteWords = [
        "https://huion.techinventory.com",
    ];

    const sections = document.getElementsByClassName("section");

    for (const sec of sections) {
        for (const word of muteWords) {
            if (sec.innerText.includes(word)) {
                sec.style.display = "none";
                break;
            }
        }
    }
})();

記事への反応(ブックマークコメント)

ログイン ユーザー登録
ようこそ ゲスト さん