MetaFilter AI/LLM Post Hider

Hides posts containing AI/A.I./LLM in title or body

// ==UserScript==
// @name         MetaFilter AI/LLM Post Hider
// @namespace    http://www.metafilter.com/
// @version      1.5
// @description  Hides posts containing AI/A.I./LLM in title or body
// @match        https://www.metafilter.com/
// @grant        none
 // @license MIT
// ==/UserScript==

(function() {
    'use strict';
    const titles = document.querySelectorAll('h2.posttitle');
    titles.forEach(title => {
        const postBody = title.nextElementSibling;
        if (!postBody || !postBody.classList.contains('post')) return;
        const fullText = title.textContent + ' ' + postBody.textContent;
        if (/(^|\W)(A\.?I\.?|LLM)(\W|$)/i.test(fullText)) {
            title.style.display = 'none';
            postBody.style.display = 'none';
        }
    });
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。