Hebraicize Typing.com

Converts Typing.com to Hebrew keyboard.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Hebraicize Typing.com
// @namespace    http://github.com/emosenkis
// @version      2024-12-08
// @description  Converts Typing.com to Hebrew keyboard.
// @author       emosenkis
// @include      https://www.typing.com/*/lesson/*
// @include      https://typing.com/*/lesson/*
// @match        http*://www.typing.com/*/lesson/*
// @match        http*://typing.com/*/lesson/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// @license      MIT
// ==/UserScript==

(function(){
    const en = "QWERTYUIOP[ASDFGHJKL;'ZXCVBNM,./";
    const he = "/'קראטוןםפ][שדגכעיחלךף,זסבהנמצתץ.";
    function hebraicize() {
        const els = document.querySelectorAll(".key-label, .letter");
        for(const el of els) {
            if (el.innerText == null || el.hebraicized === el.innerText) { continue }
            el.hebraicized = el.innerText;
            const it = el.innerText.trim();
            if (it.length !== 1) { continue };
            const idx = en.indexOf(it.toUpperCase());
            if (idx === -1) { continue };
            console.log(it + " -> " + he[idx]);
            el.innerText = el.innerText.replace(it, he[idx])
        }
    }
    hebraicize();
    new MutationObserver(hebraicize).observe(document, {childList:true,subtree:true})
}())