Invisible Typer

Type an invisible character when pressing CTRL + Space.

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         Invisible Typer
// @namespace    Royalgamer06
// @version      1.0
// @description  Type an invisible character when pressing CTRL + Space.
// @author       Royalgamer06
// @include      *
// @exclude      file://*
// @grant        unsafeWindow
// @run-at       document-idle
// ==/UserScript==

var charcode = 8290; //10240, 8290, 8192, 8193, 8239, 8204, 8195, 4448, 12644
unsafeWindow.onkeydown = function(e) {
    if (e.ctrlKey && e.keyCode == 32) {
        try {
            document.execCommand('insertText', false, String.fromCharCode(charcode));
        } catch(c) {
            try {
                document.activeElement.value = document.activeElement.value.slice(0, document.activeElement.selectionStart) + String.fromCharCode(charcode) + document.activeElement.value.slice(document.activeElement.selectionEnd);
            } catch(c) {}
        }
    }
};