Roukys / HHauto

GNU General Public License v3.0
45 stars 44 forks source link

Enhancement : hide claimed rewards - Path of Attraction #164

Closed cossname closed 3 years ago

cossname commented 3 years ago
function modulePathOfAttractionHide() {
    if (getPage() == "path_of_attraction") {
        setTimeout(modulePathOfAttractionHide, 1000);
    }
    //https://nutaku.haremheroes.com/path-of-attraction.html"
    let array = $('#path_of_attraction div.poa.container div.all-objectives .objective.completed');
    if (array.length == 0) {
        return
    }
    let lengthNeeded = $('.golden-block.locked').length > 0 ? 1 : 2;
    for (let i = array.length - 1; i >= 0; i--) {
        if ($(array[i]).find('.picked-reward').length == lengthNeeded) {
            array[i].style.display = "none";
        }
    }
}

upd 5

RuperSama commented 3 years ago
function modulePathOfAttractionHide() {
    if (getPage() == "path_of_attraction") {
        setTimeout(modulePathOfAttractionHide, 1000);
    }
    //https://nutaku.haremheroes.com/path-of-attraction.html"
    let array = $('#path_of_attraction div.poa.container div.all-objectives .objective.completed');
    if (array.length == 0) {
        return
    }
    let lengthNeeded = $('.golden-block.locked').length > 0 ? 1 : 2;
    for (let i = array.length - 1; i >= 0; i--) {
        if ($(array[i]).find('.picked-reward').length == lengthNeeded) {
            array[i].style.display = "none";
        }
    }
}

upd 5

Work fine, i add your script here https://github.com/RuperSama/HentaiHeroesScripts

in a new script called "HentaiHeroes-HideInfo.js" with other stuff more. (Tested only in HH original)

Roukys commented 3 years ago

@cossname this is a specifics for nutaku right ?

cossname commented 3 years ago

@Roukys tested only on nutaku, but i dont think there will be differences between nutaku and HH commented link with nutaku just reference to see getPage result

RuperSama commented 3 years ago

@Roukys i tested in HH and work fine