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.

  1. // ==UserScript==
  2. // @name Grundos Cafe Vending Machine Keyboard Controls
  3. // @namespace https://greasyfork.org/en/users/1291562-zarotrox
  4. // @version 1.1
  5. // @description Press enter to get your Neocola or Ice Cream. Also works with AAVM. Pairing this with GC Quick Vending Machines is advised.
  6. // @author Zarotrox
  7. // @match https://www.grundos.cafe/winter/icecream/
  8. // @match https://www.grundos.cafe/vending/select/
  9. // @match https://www.grundos.cafe/vending/
  10. // @match https://www.grundos.cafe/vending/dispense/
  11. // @match https://www.grundos.cafe/moon/neocola/
  12. // @match https://www.grundos.cafe/moon/neocola/select/
  13. // @icon https://i.ibb.co/44SS6xZ/Zarotrox.png
  14. // @license MIT
  15. // @grant none
  16. // ==/UserScript==
  17.  
  18. var Icecream = document.querySelector("input[value='Get your ice cream!']")
  19. var replay = document.querySelector("input[value='Play Again!']")
  20. var NerkmidStart = document.querySelector("input[value='Press Me to Continue!']")
  21. var Nerkmid = document.querySelector("input[value='GO!!!']")
  22. var NeocolaStart = document.querySelector("input[value='Onward!']")
  23. var Neocola = document.querySelector("input[value='Continue to your doom...']")
  24.  
  25. function Enter (element, event) {
  26. if (event.keyCode == 13) {
  27. element.click()
  28. }
  29. }
  30.  
  31. document.addEventListener("keydown", (event) => {
  32. if (event.keyCode == 13) {
  33. if (NerkmidStart != null) {
  34. NerkmidStart.click();
  35. } else if (Nerkmid != null) {
  36. Nerkmid.click();
  37. } else if (replay != null) {
  38. replay.click();
  39. }
  40.  
  41. }
  42. });
  43.  
  44. document.addEventListener("keydown", (event) => {
  45. if (event.keyCode == 13) {
  46. if (Icecream != null) {
  47. Icecream.click();
  48. } else if (replay != null) {
  49. replay.click();
  50. }
  51. }
  52. });
  53.  
  54. document.addEventListener("keydown", (event) => {
  55. if (event.keyCode == 13) {
  56. if (NeocolaStart != null) {
  57. NeocolaStart.click();
  58. } else if (Neocola != null) {
  59. Neocola.click();
  60. } else if (replay != null) {
  61. replay.click();
  62. }
  63.  
  64. }
  65. });