您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically focus text box when entering the tab
// ==UserScript== // @name Discord Auto-Focus Text Box // @namespace http://ewan.horse/ // @license MIT // @version 0.1 // @description Automatically focus text box when entering the tab // @author Ewan Green // @match https://discord.com/channels/*/* // @grant none // ==/UserScript== (function() { 'use strict'; document.addEventListener("visibilitychange", function() { if (document.visibilityState == "visible") { const box = document.getElementsByTagName("textarea")[0]; box.focus(); } }) })();