Soyjak.Party / The Sharty - The altchan born from the ashes of /qa/; also a containment thread

1782499090656.png 1782499119183.png
 
just a reminder
gaynigger retards , want you to PREVENT YOU FROM SCROLLING

use this vibe coded snippet below (tool it literally 1second to generate first trial "please make me a user script to remove this kind of aids") and it was ready

1782500143709.png
JavaScript:
// ==UserScript==
// @name         Zalgo Text Purge
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Detects and removes chaotic Zalgo text/combining diacritics from web pages.
// @author       Allah Himself
// @match        *://*/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    // Regex to match Unicode Combining Diacritical Marks (U+0300 to U+036F)
    // and Combining Diacritical Marks Extended (U+1AB0 to U+1AFF, U+1DC0 to U+1DFF, U+20D0 to U+20FF, U+FE20 to U+FE2F)
    const zalgoRegex = /[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/g;

    // Threshold: How many combining characters in a single text node before we flag it?
    // A low threshold (e.g., > 3) catches mild Zalgo. Legit text rarely has more than 2 stacked marks.
    const ZALGO_THRESHOLD = 5;

    function cleanZalgo(node) {
        // Only process actual text nodes
        if (node.nodeType === Node.TEXT_NODE) {
            const matches = node.nodeValue.match(zalgoRegex);

            if (matches && matches.length > ZALGO_THRESHOLD) {
                // Strip all the combining marks, leaving only the base characters
                node.nodeValue = node.nodeValue.replace(zalgoRegex, '');
            }
        } else {
            // Recurse through child nodes, skipping script and style tags for performance
            if (node.nodeName !== 'SCRIPT' && node.nodeName !== 'STYLE' && node.nodeName !== 'TEXTAREA') {
                for (let child of node.childNodes) {
                    cleanZalgo(child);
                }
            }
        }
    }

    // 1. Run an initial sweep of the page once DOM is loaded
    cleanZalgo(document.body);

    // 2. Set up a MutationObserver to catch dynamically loaded content (e.g., infinite scroll, chat apps)
    const observer = new MutationObserver((mutations) => {
        for (let mutation of mutations) {
            for (let addedNode of mutation.addedNodes) {
                cleanZalgo(addedNode);
            }
        }
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();
 
Wstecz
Top Na dole