Discord Global Outgoing Only UwU Converter

Detects and converts ONLY what you type into uwu style across all Discord locations.

Versión del día 18/08/2026. Echa un vistazo a la versión más reciente.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

Tendrás que instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Tendrás que instalar una extensión como Tampermonkey antes de poder instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         Discord Global Outgoing Only UwU Converter
// @namespace    http://tampermonkey.net
// @version      0.6
// @description  Detects and converts ONLY what you type into uwu style across all Discord locations.
// @author       You
// @license      MIT
// @match        *://*://*
// @match        *://://discord.com*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    // Function to convert regular text to uwu style
    function uwuify(text) {
        return text
            .replace(/[lr]/g, 'w')
            .replace(/[LR]/g, 'W')
            .replace(/n([aeiou])/g, 'ny$1')
            .replace(/N([aeiou])/g, 'Ny$1')
            .replace(/N([AEIOU])/g, 'NY$1')
            .replace(/ove/g, 'uv');
    }

    // Helper to find and update text nodes inside Discord's editor
    function processNode(node) {
        if (node.nodeType === Node.TEXT_NODE) {
            const original = node.textContent;
            const converted = uwuify(original);
            if (original !== converted) {
                node.textContent = converted;
            }
        } else {
            for (let child of node.childNodes) {
                processNode(child);
            }
        }
    }

    // Main detection logic
    function handleDetection(event) {
        const target = event.target;
        
        // Find if we are typing inside a chatbox, channel input, or pop-up text field
        if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.getAttribute('contenteditable') === 'true') {
            
            // Standard textboxes (Search bars, status updates, settings)
            if (target.value !== undefined) {
                const start = target.selectionStart;
                const end = target.selectionEnd;
                const original = target.value;
                const converted = uwuify(original);
                
                if (original !== converted) {
                    target.value = converted;
                    target.setSelectionRange(start, end);
                }
            } 
            // Discord's rich text editor elements (Channel chat box, DM text field)
            else {
                if (target.dataset.isUwUing) return;
                target.dataset.isUwUing = 'true';

                // Save cursor state
                const selection = window.getSelection();
                let savedRange = null;
                if (selection.rangeCount > 0) {
                    savedRange = selection.getRangeAt(0).cloneRange();
                }

                // Convert text elements
                processNode(target);

                // Restore cursor state
                if (savedRange && selection) {
                    try {
                        selection.removeAllRanges();
                        selection.addRange(savedRange);
                    } catch (e) {
                        // Fallback if structure changes slightly
                    }
                }

                target.removeAttribute('data-is-uwuing');
                delete target.dataset.isUwUing;
            }
        }
    }

    // Capture input events globally across the page structure (Only fires when YOU type)
    document.addEventListener('input', handleDetection, true);
})();