您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fixes issue where Discord updated and started overriding <kbd>option</kbd>+<kbd>←</kbd> and <kbd>option</kbd>+<kbd>→</kbd>, preventing the macOS default behavior of moving the caret by one word.
// ==UserScript== // @name Fix Move Caret by Word in Discord on macOS // @namespace hcientist // @description Fixes issue where Discord updated and started overriding <kbd>option</kbd>+<kbd>←</kbd> and <kbd>option</kbd>+<kbd>→</kbd>, preventing the macOS default behavior of moving the caret by one word. // @match https://discord.com/* // @version 0.0.1 // @license MIT // @grant none // @supportURL https://github.com/hcientist/fix-discord-caret/issues // ==/UserScript== console.log('prevent discord using option+horizontal_arrow'); window.addEventListener('keydown', (ev) => { if (ev.altKey && !ev.metaKey && ['ArrowLeft','ArrowRight'].includes(ev.key)){ ev.stopPropagation() } }, true)