Grundos Cafe 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.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Grundos Cafe Vending Machine Keyboard Controls
// @namespace    https://greasyfork.org/en/users/1291562-zarotrox
// @version      1.1
// @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 NerkmidStart = document.querySelector("input[value='Press Me to Continue!']")
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();
        }

      }
    });