Discord Global Outgoing Only UwU Converter

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

18.08.2026 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu betiği yüklemek için bir betik yöneticisi eklentisi yüklemeniz gerekecektir.

(Zaten bir betik yöneticim var, hadi yükleyelim!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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);
})();