您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Type an invisible character when pressing CTRL + Space.
当前为
- // ==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) {}
- }
- }
- };