HaremHeroes XP for next level

Instead of showing the total XP recquiered on the XP bar, it only show the XP for the current level

Verze ze dne 25. 09. 2018. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         HaremHeroes XP for next level
// @namespace    JDscripts
// @version      3.24
// @description  Instead of showing the total XP recquiered on the XP bar, it only show the XP for the current level
// @author       Spychopat
// @match        http*://nutaku.haremheroes.com/*
// @match        http*://*.hentaiheroes.com/*
// ==/UserScript==

function getHero()
{
    if(unsafeWindow.Hero === undefined)
    {
        setTimeout(autoLoop, Number(sessionStorage.autoLoopTimeMili))
        //console.log(window.wrappedJSObject)
    }
    return unsafeWindow.Hero;
}

(function() {
    'use strict';

    var xpActuelle = getHero().infos.Xp.cur - Hero.infos.Xp.min;
    var xpObjectif = getHero().infos.Xp.max - Hero.infos.Xp.min;
    //console.log("XP : " + xpActuelle + "/" + xpObjectif);
    var divXpBarInfos = document.getElementsByClassName("over reversed_tooltip")[0];
    //console.log(divXpBarInfos);
    var spansXpBarInfos = divXpBarInfos.getElementsByTagName("span");
    //console.log(spansXpBarInfos);
    spansXpBarInfos[0].innerHTML = xpActuelle;
    spansXpBarInfos[2].innerHTML = xpObjectif;
    //console.log(divXpBarInfos);
})();