GC Vending Machine Keyboard Controls

Press enter to get your Neocola or Ice Cream. Also works with AAVM. Pairing this with GC Quick Vending Machines is advised.

当前为 2024-07-12 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         GC Vending Machine Keyboard Controls
// @namespace    https://greasyfork.org/en/users/1291562-zarotrox
// @version      1.0
// @description  Press enter to get your Neocola or Ice Cream. Also works with AAVM. Pairing this with GC Quick Vending Machines is advised.
// @author       Zarotrox
// @match        https://www.grundos.cafe/winter/icecream/
// @match        https://www.grundos.cafe/vending/select/
// @match        https://www.grundos.cafe/vending/
// @match        https://www.grundos.cafe/vending/dispense/
// @match        https://www.grundos.cafe/moon/neocola/
// @match        https://www.grundos.cafe/moon/neocola/select/
// @icon         https://i.ibb.co/44SS6xZ/Zarotrox.png
// @license MIT
// @grant        none
// ==/UserScript==

var Icecream = document.querySelector("input[value='Get your ice cream!']")
var replay = document.querySelector("input[value='Play Again!']")
var Nerkmid = document.querySelector("input[value='GO!!!']")
var NeocolaStart = document.querySelector("input[value='Onward!']")
var Neocola = document.querySelector("input[value='Continue to your doom...']")

function Enter (element, event) {
  if (event.keyCode == 13) {
    element.click()
  }
}

    document.addEventListener("keydown", (event) => {
      if (event.keyCode == 13) {
        if (NerkmidStart != null) {
            NerkmidStart.click();
        } else if (Nerkmid != null) {
            Nerkmid.click();
             } else if (replay != null) {
            replay.click();
        }

      }
    });

 document.addEventListener("keydown", (event) => {
      if (event.keyCode == 13) {
        if (Icecream != null) {
            Icecream.click();
        } else if (replay != null) {
            replay.click();
             }
      }
    });

 document.addEventListener("keydown", (event) => {
      if (event.keyCode == 13) {
        if (NeocolaStart != null) {
            NeocolaStart.click();
        } else if (Neocola != null) {
            Neocola.click();
             } else if (replay != null) {
            replay.click();
        }

      }
    });