What can filter 4chan posts by a list of words of regexes?I don't want to run 4chan-x. I don't want mobile shit. Just the normal 4chan website and an unintrusive script that hides recurring shitposts of my choice.
A bit manual to update, but Tampermonkey + ChatGPT code works fine for this. Whipped this up real quick and it seems to work fine. You might need to figure out how to turn on developer mode or enable scripts for whatever browser you use but that should be pretty doable. Downside is that you need to manually add the regex to the array whenever you have something new to block.// ==UserScript==// @name 4chan Thread Filter// @namespace http://tampermonkey.net/// @version 1.0// @description Hide 4chan threads matching certain regexes// @match *://boards.4chan.org/*// @grant none// @run-at document-idle// ==/UserScript==(function() { 'use strict'; const regexList = [ /shiggy\s*diggy/i, ]; const removeCompletely = false; // true = delete from DOM const threadSelector = '.thread, .catalog-thread'; function filterThreads() { document.querySelectorAll(threadSelector).forEach(thread => { const text = thread.innerText || ''; if (regexList.some(rx => rx.test(text))) { if (removeCompletely) { thread.remove(); } else { thread.style.display = 'none'; } } }); } console.log('script running'); window.addEventListener('load', () => setTimeout(filterThreads, 1000)); const observer = new MutationObserver(filterThreads); observer.observe(document.body, { childList: true, subtree: true });})();
>>1544841I like how you completely ignored OP's second sentence.
>>1544841>>1544847Something like this would be OK. But that code seems to be for threads only.>>1544845I thought that was for threads only. The UI tricked me into thinking that because the [Filters] link is only on the catalog view.