您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds keyboard controls for movement in DelugeRPG's mobile version.
当前为
- // ==UserScript==
- // @name DelugeRPG Movement Controller for Mobile UI
- // @namespace http://tampermonkey.net/
- // @version 0.5
- // @description Adds keyboard controls for movement in DelugeRPG's mobile version.
- // @license MIT
- // @author Your Name
- // @match https://m.delugerpg.com/map*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // This script was designed to enhance gameplay convenience by adding keyboard controls to DelugeRPG's mobile version.
- // While created with good intentions, I want to emphasize that I will promptly remove it if any functionality conflicts with the platform's Terms of Service.
- // Thank you for your understanding and support.
- const movementKeys = {
- 'q': '#dr-nw',
- 'w': '#dr-n',
- 'e': '#dr-ne',
- 'a': '#dr-w',
- 's': '#dr-s',
- 'd': '#dr-e',
- 'z': '#dr-sw',
- 'x': '#dr-s',
- 'c': '#dr-se'
- };
- document.addEventListener('keydown', function(e) {
- const selector = movementKeys[e.key];
- if (selector) {
- const button = document.querySelector(selector);
- if (button) {
- button.click();
- e.preventDefault();
- }
- }
- });
- })();