Greasy Fork is available in English.

Sploop.io update script

12/6/2022, 11:57:43 AM

  1. // ==UserScript==
  2. // @name Sploop.io update script
  3. // @namespace Trash key bind changing
  4. // @match https://sploop.io/
  5. // @grant none
  6. // @version 1.1
  7. // @author Urban Dubov
  8. // @description 12/6/2022, 11:57:43 AM
  9. // ==/UserScript==
  10. const keybindObj = {
  11. keybinds: `{"0":"KeyW","1":"KeyS","2":"KeyD","3":"KeyA","4":"KeyF","5":"KeyQ","6":"Space","7":"KeyR","8":"KeyR","9":"KeyX","10":"KeyE","11":"ArrowUp","12":"ArrowRight","13":"ArrowDown","14":"ArrowLeft","15":"Escape","16":"Enter","17":"KeyL","18":"KeyN"}`,
  12. applicationUpdate: function (id, keybinds) {
  13. localStorage.removeItem(id);
  14. localStorage.removeItem(keybinds);
  15. localStorage.setItem(keybinds, this.keybinds);
  16. },
  17. },
  18. settings = { ...keybindObj },
  19. Settings = settings;
  20. Settings.applicationUpdate("_adIds", "keybinds");
  21. const reset = document.getElementById("reset-keybinds");
  22. reset.classList.add("text-shadowed-3");
  23. reset.innerHTML = "Reset";
  24. reset.style.cssText = ` background:#f0ece0; border:4px solid #141414; height:fit-content; border-radius:0; box-shadow:inset 0 23px 0 #e8e0c8; text-align:center; font-size:14px; outline:none; color:#fff; cursor:url(img/ui/cursor-pointer.png) 6 0,pointer;`;
  25. const fixedSettingsMenu = [".pop-box {", "border-radius: 0;", "box-shadow: none;", "justify-content: space-evenly;", "}", ".setting-line {", "margin-bottom: 10px;", "}", ".pop-box::-webkit-scrollbar {", "-webkit-appearance: none;", "width: 15px;", "height: 12px;", "background: rgba(40, 45, 34, 0.6);", "border: 3px solid #141414;", "outline: none;", "}", ".pop-box::-webkit-scrollbar-thumb {", "cursor: url(img/ui/cursor-pointer.png) 6 0, pointer;", "-webkit-appearance: none;", "width: 20px;", "border-radius: 4px;", "height: 20px;", "background: #f0ece0;", "border: 4px solid #141414;", "position: relative;", "z-index: 3;", "}", ".pop-box .input {", "background: #f0ece0;", "border: 4px solid #141414;", "height: fit-content;", "border-radius: 0;", "box-shadow: inset 0 23px 0 #e8e0c8;", "text-align: center;", "font-size: 14px;", "outline: none;", "color: white;", "cursor: url(img/ui/cursor-text.png) 16 0, text;", "}", ".control_indicator {", "position: absolute;", "top: 0px;", "left: 0;", "height: 30px;", "width: 30px;", "background: #fdfdfd;", "border: 4px solid #141414;", "border-radius: 0;", "font-size: 14px;", "cursor: url(img/ui/cursor-pointer.png) 6 0, pointer;", "}"].join("\n");
  26. if (typeof GM_addStyle != "undefined") {
  27. GM_addStyle(fixedSettingsMenu);
  28. } else if (typeof PRO_addStyle != "undefined") {
  29. PRO_addStyle(fixedSettingsMenu);
  30. } else if (typeof addStyle != "undefined") {
  31. addStyle(fixedSettingsMenu);
  32. } else {
  33. var node = document.createElement("style");
  34. node.type = "text/css";
  35. node.appendChild(document.createTextNode(fixedSettingsMenu));
  36. var heads = document.getElementsByTagName("head");
  37. if (heads.length > 0) {
  38. heads[0].appendChild(node);
  39. } else {
  40. document.documentElement.appendChild(node);
  41. }
  42. }