您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds keyboard controls for questing on GC.
当前为
// ==UserScript== // @name GC Questing Keyboard Controls // @namespace http://tampermonkey.net/ // @version 3.1 // @description Adds keyboard controls for questing on GC. // @author Z & Dij // @match https://www.grundos.cafe/halloween/esophagor/* // @match https://www.grundos.cafe/island/kitchen/* // @match https://www.grundos.cafe/winter/snowfaerie/* // @match https://www.grundos.cafe/halloween/witchtower/* // @match https://www.grundos.cafe/halloween/braintree/* // @match https://www.grundos.cafe/safetydeposit/* // @match https://www.grundos.cafe/market/wizard/* // @match https://www.grundos.cafe/market/browseshop/?owner=* // @license MIT // @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe // ==/UserScript== // shoutout to Dij for the massive optimization & to Berna and Kait for further JS help <3 var rmOne = document.querySelector("a.sdb-remove-one-text"); var search = document.querySelector("div.sw_search_submit input.form-control"); var shop = document.querySelector(".market_grid.sw_results .data a:nth-child(1)"); var buy = document.querySelector("#searchedItem.shop-item input[type='image']"); var brain = document.querySelector("img[title='Brain Tree Quest']"); var eso = document.querySelector("img[title='Esophagor Quest']"); var chef = document.querySelector("img[title='Kitchen Quest']"); var taelia = document.querySelector("img[title='Taelia Quest']"); var edna = document.querySelector("img[title='Edna Quest']"); document.addEventListener("keydown", (event) => { if (event.keyCode == 13) { // enter if (rmOne != null) { rmOne.click(); } else if (buy != null) { buy.click(); } else if (search != null) { search.click(); } else if (shop != null) { shop.click(); } else if (location.pathname.match(/halloween|island|winter/)) { let queststart = document.getElementById("page_content").querySelector("form .form-control"); if (queststart != null) { queststart.click(); } else { document.getElementById("page_content").querySelector(".form-control:first-child[type=button]").click(); } } } }); document.addEventListener("keydown", (event) => { let codes = [37, 38, 39, 40] // left, up, right, down arrow keys let index = codes.indexOf(event.keyCode) + 1; console.log(index); if (index > 0 ) { let item = document.querySelector(`.itemList .shop-item:nth-child(${index}) img.search-helper-sdb-exists`); console.log(item); if (item != null) { item.click(); } else { document.querySelector(`.itemList .shop-item:nth-child(${index}) img.search-helper-sw`).click(); } } }); document.addEventListener("keydown", (event) => { if (event.keyCode == 81) { // Q edna.click(); } }); document.addEventListener("keydown", (event) => { if (event.keyCode == 87) { // W eso.click(); } }); document.addEventListener("keydown", (event) => { if (event.keyCode == 69) { // E taelia.click(); } }); document.addEventListener("keydown", (event) => { if (event.keyCode == 82) { // R chef.click(); } }); document.addEventListener("keydown", (event) => { if (event.keyCode == 84) { // T brain.click(); } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址