您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Binds each die to a number and "keep" to Enter so you can play without a mouse.
// ==UserScript== // @name GC Bilge Dice Keyboard Controls // @namespace https://gf.qytechs.cn/en/users/1175371/ // @version 0.2 // @description Binds each die to a number and "keep" to Enter so you can play without a mouse. // @author sanjix // @match https://www.grundos.cafe/games/bilgedice/* // @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe // @grant none // @license MIT // ==/UserScript== var dice = document.querySelectorAll("#bilge-dice-user-wrapper form .spacing-horizontal-dice label input"); var keep = document.querySelector(".bilge-dice-col input[value='Keep']"); var checkForWin = document.querySelector("input[value='See if you defeated those scallywags!!']"); var restart = document.querySelector("#bilge-dice-wrapper form input[type='submit']"); var newGame = document.querySelectorAll('form.mt-1 input.form-control[type="submit"]'); newGame = newGame[newGame.length - 1]; document.addEventListener("keydown", ((event) => { switch (event.keyCode) { case 49: //1 { dice[0].click(); } break; case 50: //2 { if (dice.length >= 2) { dice[1].click(); } } break; case 51: //3 { if (dice.length >= 3) { dice[2].click(); } } break; case 52: //4 { if (dice.length >= 4) { dice[3].click(); } } break; case 53: //5 { if (dice.length >= 5) { dice[4].click(); } } break; case 54: //6 { if (dice.length == 6) { dice[5].click(); } } break; case 13: //enter { if (keep != null) { keep.click(); } else if (checkForWin != null) { checkForWin.click(); } else if (newGame != null) { newGame.click(); } else if (restart != null) { restart.click(); } } break; } }));
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址