Universal uwuifyer

Brute-force converts your typed text into uwu style across ALL websites seamlessly!

目前為 2026-08-18 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Universal uwuifyer
// @namespace    http://tampermonkey.net
// @version      1.5
// @description  Brute-force converts your typed text into uwu style across ALL websites seamlessly!
// @author       You
// @license      MIT
// @match        *://*/*
// @include      *
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    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');
    }

    function forceInjectText(target, newText) {
        target.focus();
        
        if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {
            target.select();
        } else {
            const selection = window.getSelection();
            const range = document.createRange();
            range.selectNodeContents(target);
            selection.removeAllRanges();
            selection.addRange(range);
        }

        document.execCommand('insertText', false, newText);
    }

    document.addEventListener('input', function(event) {
        const target = event.target;
        if (!target || target.dataset.isUwUing) return;

        const isInput = target.tagName === 'INPUT' || target.tagName === 'TEXTAREA';
        const isEditable = target.getAttribute('contenteditable') === 'true';

        if (isInput || isEditable) {
            const original = isInput ? target.value : target.innerText;
            const converted = uwuify(original || "");

            if (original !== converted) {
                target.dataset.isUwUing = 'true';
                forceInjectText(target, converted);
                delete target.dataset.isUwUing;
            }
        }
    }, true);
})();