Greasy Fork is available in English.

Panel Tytanów

xyz

// ==UserScript==
// @name         Panel Tytanów
// @version      1.12
// @description  xyz
// @namespace
// @author       Mateoo
// @match        http*://nexos.margonem.pl
// @grant        none
// @namespace https://greasyfork.org/users/1036645
// ==/UserScript==
(Engine => {

    //przycisk
    const defaultPosition = [3, 'bottom-left-additional']

    const addWidgetToDefaultWidgetSet = function() {
        Engine.widgetManager.addKeyToDefaultWidgetSet(
            'tytanypanel',
            defaultPosition[0],
            defaultPosition[1],
            'Panel Tytanów',
            'green',
            changeMenuState
        )
    }

    $('head').append('<style>' +
        '.main-buttons-container .widget-button .icon.tytanypanel {' +
        'background-image: url("https://i.imgur.com/Nc4KL5X.png");' +
        'background-position: 0;' +
        '}' +
        '</style>'
    )
    const addWidgetButtons = Engine.widgetManager.addWidgetButtons
    Engine.widgetManager.addWidgetButtons = function(additionalBarHide) {
        addWidgetButtons.call(Engine.widgetManager, additionalBarHide)
        addWidgetToDefaultWidgetSet()
        createButtonNI()

        Engine.widgetManager.addWidgetButtons = addWidgetButtons
    }

    if (Engine.interfaceStart) {
        addWidgetToDefaultWidgetSet()
        createButtonNI()
    }

    function createButtonNI() {
        if (Engine.interfaceStart && Object.keys(Engine.widgetManager.getDefaultWidgetSet()).includes('tytanypanel')) {
            let tytanypanelPos = defaultPosition

            const serverStoragePos = Engine.serverStorage.get(Engine.widgetManager.getPathToHotWidgetVersion())
            if (serverStoragePos && serverStoragePos.tytanypanel) tytanypanelPos = serverStoragePos.tytanypanel

            Engine.widgetManager.createOneWidget('tytanypanel', { tytanypanel: tytanypanelPos }, true, [])
            Engine.widgetManager.setEnableDraggingButtonsWidget(false)
        } else setTimeout(createButtonNI, 500)
    }
//odwolanie

    var menu = document.createElement("div");

const changeMenuState = function() {
  menu.style["display"] = menu.style["display"] == "block" ? "none" : "block";
}

menu.id = "tytany_menu";
menu.style.cssText = "position:absolute;top:1%;left:13%;width:17%;height:87%;background-color: rgba(108, 114, 115, 0.3);color:#0d3a6b;border-style:solid;border-width:1.5px;border-color:#098491;border-radius:16px;opacity:0.9;font-size:20px;font-family:Comic Sans MS;z-index:999;display:none";

var orlaDiv = document.createElement("div");
orlaDiv.id = "orla";
orlaDiv.style.cssText = "position:absolute;top:1%;left:2%;width: 23%; height: 17%; text-align: center; background-color: #24803c; border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(orlaDiv);

var orlaTitle = document.createElement("h3");
orlaTitle.innerText = "Dziewicza Orlica";
orlaTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
orlaDiv.appendChild(orlaTitle);

var orlaImg = document.createElement("img");
orlaImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/dziewicza_orlica.gif"; // ścieżarcy do obrazarcy
orlaImg.style.cssText = "max-width: 90%;max-height: 90%;";
orlaDiv.appendChild(orlaImg);

var orlaPodpis = document.createElement("h3");
orlaPodpis.innerText = "";
orlaPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
orlaDiv.appendChild(orlaPodpis);

var kicDiv = document.createElement("div");
kicDiv.id = "kic";
kicDiv.style.cssText = "position:absolute;top:1%;left:25.8%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(kicDiv);

var kicTitle = document.createElement("h3");
kicTitle.innerText = "Zabójczy Królik";
kicTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
kicDiv.appendChild(kicTitle);

var kicImg = document.createElement("img");
kicImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/zabojczy_krolik.gif"; // ścieżarcy do obrazarcy
kicImg.style.cssText = "max-width: 90%;max-height: 90%;margin-top:10%;";
kicDiv.appendChild(kicImg);

var kicPodpis = document.createElement("h3");
kicPodpis.innerText = "";
kicPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
kicDiv.appendChild(kicPodpis);

var reneDiv = document.createElement("div");
reneDiv.id = "rene";
reneDiv.style.cssText = "position:absolute;top:1%;left:49.8%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(reneDiv);

var reneTitle = document.createElement("h3");
reneTitle.innerText = "Renegat Baulus";
reneTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
reneDiv.appendChild(reneTitle);

var reneImg = document.createElement("img");
reneImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/titanbandit.gif"; // ścieżarcy do obrazarcy
reneImg.style.cssText = "max-width: 60%;max-height: 60%;margin-top:10%;";
reneDiv.appendChild(reneImg);

var renePodpis = document.createElement("h3");
renePodpis.innerText = "";
renePodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
reneDiv.appendChild(renePodpis);

var arcyDiv = document.createElement("div");
arcyDiv.id = "arcy";
arcyDiv.style.cssText = "position:absolute;top:1%;left:73.9%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(arcyDiv);

var arcyTitle = document.createElement("h3");
arcyTitle.innerText = "Piekielny Arcymag";
arcyTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
arcyDiv.appendChild(arcyTitle);

var arcyImg = document.createElement("img");
arcyImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/archdemon.gif"; // ścieżarcy do obrazarcy
arcyImg.style.cssText = "max-width: 60%;max-height: 60%;margin-top:20%;";
arcyDiv.appendChild(arcyImg);

var arcyPodpis = document.createElement("h3");
arcyPodpis.innerText = "";
arcyPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
arcyDiv.appendChild(arcyPodpis);

var zonsDiv = document.createElement("div");
zonsDiv.id = "zons";
zonsDiv.style.cssText = "position:absolute;top:18.6%;left:2%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(zonsDiv);

var zonsTitle = document.createElement("h3");
zonsTitle.innerText = "Versus Zoons";
zonsTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
zonsDiv.appendChild(zonsTitle);

var zonsImg = document.createElement("img");
zonsImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/titangoblin.gif"; // ścieżarcy do obrazarcy
zonsImg.style.cssText = "max-width: 60%;max-height: 60%;margin-top:20%;";
zonsDiv.appendChild(zonsImg);

var zonsPodpis = document.createElement("h3");
zonsPodpis.innerText = "";
zonsPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
zonsDiv.appendChild(zonsPodpis);

var łowkaDiv = document.createElement("div");
łowkaDiv.id = "łowka";
łowkaDiv.style.cssText = "position:absolute;top:18.6%;left:25.8%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(łowkaDiv);

var łowkaTitle = document.createElement("h3");
łowkaTitle.innerText = "Łowczyni Wspomnień";
łowkaTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
łowkaDiv.appendChild(łowkaTitle);

var łowkaImg = document.createElement("img");
łowkaImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/lowcz-wspo-driady.gif"; // ścieżarcy do obrazarcy
łowkaImg.style.cssText = "max-width: 60%;max-height: 60%;margin-top:20%;";
łowkaDiv.appendChild(łowkaImg);

var łowkaPodpis = document.createElement("h3");
łowkaPodpis.innerText = "";
łowkaPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
łowkaDiv.appendChild(łowkaPodpis);

var przyzDiv = document.createElement("div");
przyzDiv.id = "przyz";
przyzDiv.style.cssText = "position:absolute;top:18.6%;left:49.8%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(przyzDiv);

var przyzTitle = document.createElement("h3");
przyzTitle.innerText = "Przyzywacz Demonów";
przyzTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
przyzDiv.appendChild(przyzTitle);

var przyzImg = document.createElement("img");
przyzImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/przyz_demon_sekta.gif"; // ścieżarcy do obrazarcy
przyzImg.style.cssText = "max-width: 95%;max-height: 95%;margin-top:20%;";
przyzDiv.appendChild(przyzImg);

var przyzPodpis = document.createElement("h3");
przyzPodpis.innerText = "";
przyzPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
przyzDiv.appendChild(przyzPodpis);

var maguDiv = document.createElement("div");
maguDiv.id = "magu";
maguDiv.style.cssText = "position:absolute;top:18.6%;left:73.9%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(maguDiv);

var maguTitle = document.createElement("h3");
maguTitle.innerText = "Maddok Magua";
maguTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
maguDiv.appendChild(maguTitle);

var maguImg = document.createElement("img");
maguImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/maddok-tytan.gif"; // ścieżarcy do obrazarcy
maguImg.style.cssText = "max-width: 60%;max-height: 60%;margin-top:20%;";
maguDiv.appendChild(maguImg);

var maguPodpis = document.createElement("h3");
maguPodpis.innerText = "";
maguPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
maguDiv.appendChild(maguPodpis);

var tezDiv = document.createElement("div");
tezDiv.id = "tez";
tezDiv.style.cssText = "position:absolute;top:36.2%;left:2%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(tezDiv);

var tezTitle = document.createElement("h3");
tezTitle.innerText = "Tezcatlipoca";
tezTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
tezDiv.appendChild(tezTitle);

var tezImg = document.createElement("img");
tezImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/tezcatlipoca.gif"; // ścieżarcy do obrazarcy
tezImg.style.cssText = "max-width: 95%;max-height: 95%;margin-top:20%;";
tezDiv.appendChild(tezImg);

var tezPodpis = document.createElement("h3");
tezPodpis.innerText = "";
tezPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
tezDiv.appendChild(tezPodpis);

var barbDiv = document.createElement("div");
barbDiv.id = "barb";
barbDiv.style.cssText = "position:absolute;top:36.2%;left:25.8%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(barbDiv);

var barbTitle = document.createElement("h3");
barbTitle.innerText = "Barbatos Smoczy Strażnik";
barbTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
barbDiv.appendChild(barbTitle);

var barbImg = document.createElement("img");
barbImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/hebrehoth_smokoludzie.gif"; // ścieżarcy do obrazarcy
barbImg.style.cssText = "max-width: 95%;max-height: 95%;margin-top:5%;";
barbDiv.appendChild(barbImg);

var barbPodpis = document.createElement("h3");
barbPodpis.innerText = "";
barbPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
barbDiv.appendChild(barbPodpis);

var thhDiv = document.createElement("div");
thhDiv.id = "thh";
thhDiv.style.cssText = "position:absolute;top:36.2%;left:49.8%;width: 23%; height: 17%; text-align: center; background-color: #24803c;border-radius:4px;border: 1px solid bzonsck;";
menu.appendChild(thhDiv);

var thhTitle = document.createElement("h3");
thhTitle.innerText = "Tanroth";
thhTitle.style.cssText = "font-size: 10px; color: #fff;font-weight: bold;text-shadow: 1px 1px #0a0909;";
thhDiv.appendChild(thhTitle);

var thhImg = document.createElement("img");
thhImg.src = "https://micc.garmory-cdn.cloud/obrazki/npc/tyt/ice_king.gif"; // ścieżarcy do obrazarcy
thhImg.style.cssText = "max-width: 95%;max-height: 95%;margin-top:5%;";
thhDiv.appendChild(thhImg);

var thhPodpis = document.createElement("h3");
thhPodpis.innerText = "";
thhPodpis.style.cssText = "font-size: 10px; color: #c90c48;font-weight: bold;text-shadow: 1px 1px #edcece;";
thhDiv.appendChild(thhPodpis);

var refreshButton = document.createElement("button");
refreshButton.innerHTML = "<img src='https://i.imgur.com/0igjW7J.png' width='40px' height='40px' alt='Odśwież' />";
refreshButton.style.cssText = "position:absolute;top:70%;left:44%; border-radius:5px; background-color: #21b865; color: #fff;";
refreshButton.style.cssText += "background-color: #21b865; color: #fff;";
refreshButton.style.cssText += "transition: background-color 0.3s ease-in-out;";
refreshButton.addEventListener("mouseenter", function() {
    refreshButton.style.backgroundColor = "#66afe9";
});
refreshButton.addEventListener("mouseleave", function() {
    refreshButton.style.backgroundColor = "#21b865";
});
menu.appendChild(refreshButton);
refreshButton.addEventListener("click", function() {
let respTimerseveArray = [
["dziewicza orlica", "orla", 20, 60],
["zabójczy królik", "kic", 10, 30],
["renegat baulus", "rene", 45, 135],
["piekielny arcymag", "arcy", 45, 135],
["versus zoons", "zons", 45, 135],
["łowczyni wspomnień", "łowka", 55, 165],
["przyzywacz demonów", "przyz", 55, 165],
["maddok magua", "magu", 55, 165],
["tezcatlipoca", "tez", 55, 165],
["barbatos smoczy straznik", "barb", 55, 165],
["tanroth", "thh", 60, 180]
];
let arrayTimerseve = document.getElementsByClassName("cll-timer");
for (let i=0; i<arrayTimers.length; i++){
    if(!arrayTimers[i].dataset.tip.includes("Dodany przez")){
        if(respTimerseveArray.findIndex(arr => arr.includes(arrayTimers[i].firstElementChild.innerText.toLowerCase())) !== -1){
            let firstIndex = respTimerseveArray.findIndex(arr => arr.includes(arrayTimers[i].firstElementChild.innerText.toLowerCase()));
            if(arrayTimers[i].firstElementChild.style.color.includes("rgb")){
                document.getElementById(respTimerseveArray[firstIndex][1]).style.backgroundColor = '#ccc372';
             document.getElementById(respTimerseveArray[firstIndex][1]).children[2].innerText = arrayTimers[i].children[1].innerText;
            }
            else{
                document.getElementById(respTimerseveArray[firstIndex][1]).style.backgroundColor = '#cf616a';
            }
        }
    }
}




});


document.querySelector(".game-window-positioner").appendChild(menu);
    $("#tytany_menu").draggable();
    })(window.Engine)