Detect Gamemode

try to take over the world!

Versión del día 3/9/2024. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Detect Gamemode
// @namespace    http://tampermonkey.net/
// @version      0.0.2
// @description  try to take over the world!
// @author       r!PsAw
// @match        https://diep.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=diep.io
// @grant        none
// @license      MIT
// ==/UserScript==

let gamemode;
function check_gamemode (){
 let gamemode_sel_btn = document.querySelector("#gamemode-selector > div > div.selected");
   switch(gamemode_sel_btn.getAttribute("value")){
       case "ffa":
           gamemode = "ffa";
           break
       case "teams":
           gamemode = "2tdm";
           break
       case "4teams":
           gamemode = "4tdm";
           break
       case "maze":
           gamemode = "maze";
           break
      case "event":
           gamemode = document.querySelector("#gamemode-selector > div > div.selected > div.dropdown-label").innerHTML;;
           break
      case "sandbox":
           gamemode = "sandbox";
           break
   }
    window.gm = gamemode;
    console.log(gamemode);
}

setInterval(check_gamemode, 100);
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元