Universal uwuifyer

Automatically turns your text into uwu style across all websites!

2026-08-18 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Universal uwuifyer
// @namespace    http://tampermonkey.net
// @version      1.3
// @description  Automatically turns your text into uwu style across all websites!
// @author       You
// @license      MIT
// @match        *://*/*
// @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');
    }

    // Process normal text inputs and textareas on any site
    document.addEventListener('input', function(event) {
        const target = event.target;
        if (!target) return;

        // Check if typing in a standard input box or textarea
        if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {
            const original = target.value;
            const converted = uwuify(original);

            if (original !== converted) {
                // Keep the typing cursor position intact
                const start = target.selectionStart;
                const end = target.selectionEnd;
                
                target.value = converted;
                target.setSelectionRange(start, end);
            }
        }
        
        // Handle custom web editors (like Discord's main text block)
        else if (target.getAttribute('contenteditable') === 'true') {
            if (target.dataset.isUwUing) return;
            target.dataset.isUwUing = 'true';

            // Find Discord's hidden interface controller to safely inject text
            const reactKey = Object.keys(target).find(k => k.startsWith('__reactFiber$') || k.startsWith('__reactInternalInstance$'));
            
            if (reactKey) {
                try {
                    let node = target[reactKey];
                    while (node) {
                        if (node.memoizedProps && node.memoizedProps.editor) {
                            const editor = node.memoizedProps.editor;
                            const originalText = target.innerText || "";
                            const uwuText = uwuify(originalText);

                            if (originalText !== uwuText) {
                                const savedSelection = editor.selection;
                                editor.selectAll();
                                editor.insertText(uwuText);
                                if (savedSelection) editor.selection = savedSelection;
                            }
                            break;
                        }
                        node = node.return;
                    }
                } catch (e) {}
            }
            delete target.dataset.isUwUing;
        }
    }, true);
})();