您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
13/02/2024, 14:07:09
// ==UserScript== // @name Spreeder Remap Left-Right to PgDown-PgUp (presenter usage) // @namespace Violentmonkey Scripts // @match https://www.spreeder.com/app.php* // @grant none // @license MIT // @version 1.0 // @author chatGPT 4.0 Turbo // @description 13/02/2024, 14:07:09 // ==/UserScript== document.addEventListener('keydown', function(e) { let simulatedEvent; // Check if the pressed key is 'Page Down' if (e.code === 'PageDown') { e.preventDefault(); // Prevent the default Page Down action // Create a new event that simulates the pressing of the Right Arrow key simulatedEvent = new KeyboardEvent('keydown', { key: 'ArrowRight', code: 'ArrowRight', keyCode: 39, // keyCode for Right Arrow which: 39, // Deprecated, but included for compatibility bubbles: true, // Event should bubble up through the DOM cancelable: true // Event can be canceled }); } // Check if the pressed key is 'Page Up' else if (e.code === 'PageUp') { e.preventDefault(); // Prevent the default Page Up action // Create a new event that simulates the pressing of the Left Arrow key simulatedEvent = new KeyboardEvent('keydown', { key: 'ArrowLeft', code: 'ArrowLeft', keyCode: 37, // keyCode for Left Arrow which: 37, // Deprecated, but included for compatibility bubbles: true, // Event should bubble up through the DOM cancelable: true // Event can be canceled }); } // If a simulated event was created, dispatch it if (simulatedEvent) { document.dispatchEvent(simulatedEvent); } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址