您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Allows you to send messages by hitting Enter.
// ==UserScript== // @name Sky Keyboard Enter // @namespace https://github.com/Silverfeelin/ // @version 0.1 // @description Allows you to send messages by hitting Enter. // @author Silverfeelin // @license MIT // @match https://keyboard.sky.thatgame.co/keyboard/ // @grant none // ==/UserScript== let bound = false; let textarea; let interval = setInterval(function() { const textarea = document.querySelector('textarea[placeholder="Your message here!"]'); if (!textarea) { return; } clearInterval(interval); console.log('Sky Keyboard Enter: Bound!'); textarea.addEventListener('keydown', function(e) { if (e.code === 'Enter' && !e.shiftKey) { const button = document.querySelector('button[type="submit"][aria-label="submit message"]'); if (!button) { return; } button.click(); e.preventDefault(); e.stopPropagation(); } }); }, 500);