// ==UserScript== // @name Gladiatus Tools // @namespace https://greasyfork.org/users/904482 // @version 0.1.11 // @description Set of tools and aids for the game Gladiatus // @author lpachecob // @grant none // @match *.gladiatus.gameforge.com/game/index.php* // @icon https://raw.githubusercontent.com/lpachecob/Gladiatus-Tools/main/GT_-removebg-preview.ico // @license MIT // @downloadURL none // ==/UserScript== class GladiatusTools{ static SetTool(){ const getURL = window.location.search.split("&") const mainMenu = document.getElementById("mainmenu"); if (getURL[0] == "?mod=guildMarket" && getURL[1] != "submod=control") { MarketHelps(); } else if (getURL[0] == "?mod=guildMarket" && getURL[1] == "submod=control") { //comming soon } else if (getURL[0] == "?mod=auction") { AcutionHouseTools(); } else if (getURL[0] == "?mod=forge" && getURL[1] == "submod=smeltery") { SmelteryTimeSaverExtension(); } else if (getURL[0] == "?mod=forge" && getURL[1] == "submod=forge") { Herreria(); }else if(getURL[0] == "?mod=packages"){ Paquetes.UI(); } } static Run(){ GladiatusTools.SetTool(); Menu.Dibujar(); window.addEventListener("load", () => { localStorage.TimeSaverExist = TimeSaver.Exist(); TimeSaver.setKeyForStop(JSON.parse(localStorage.TimeSaverExist)); TimeSaver.StopOnKey(); }); } } class insertOnPage{ // Antes que el propio elemento. static beforebegin(object, html){ object.insertAdjacentHTML("beforebegin", html); } //Justo dentro del elemento, antes de su primer elemento hijo. static afterbegin(object, html){ object.insertAdjacentHTML("afterbegin", html); } //Justo dentro del elemento, después de su último elemento hijo. static beforeend(object, html){ object.insertAdjacentHTML("beforeend", html); } //Después del propio elemento. static afterend(object, html){ object.insertAdjacentHTML("afterend", html); } } class Menu{ static Dibujar(){ document.body.insertAdjacentHTML("afterbegin",`
`); let menuOpen = document.getElementById("MenuOpen"); menuOpen.addEventListener("click", Menu.openNav); let closeMenu = document.getElementById("CloseMenu"); closeMenu.addEventListener("click", Menu.closeNav); document.addEventListener('mouseup', function(e) { var container = document.getElementById("menuSidenav"); if (!container.contains(e.target)) { container.style.display = 'none'; } }); Configuracion.Notificaciones(); } static openNav() { document.getElementById("menuSidenav").style.display = "block"; } static closeNav() { document.getElementById("menuSidenav").style.display = "none"; } static addConfig(html){ html+= "