Hentai Heroes++ (OCD) Season version

Adding things here and there in the Hentai Heroes game.

< Обсуждения Hentai Heroes++ (OCD) Season version

Отзыв: Хороший — скрипт работает как нужно

I love your work but is it possible to put the option to use the old "troll menu"?
I used it to add shortcut to change worlds more easily.
// World Troll Shortcut
if(window.location.href.includes("world")) world(); // help s to change Tier easier
if(window.location.href.includes("troll-pre-battle")) world(); // help s to change Tier easier
// World Troll Shortcut
function world() {
//console.log('World Shortcut');
document.querySelector("#TrollsID > a[href$='=1']").insertAdjacentHTML('beforebegin', 'W02');
document.querySelector("#TrollsID > a[href$='=2']").insertAdjacentHTML('beforebegin', 'W03');
document.querySelector("#TrollsID > a[href$='=3']").insertAdjacentHTML('beforebegin', 'W04');
document.querySelector("#TrollsID > a[href$='=4']").insertAdjacentHTML('beforebegin', 'W05');
document.querySelector("#TrollsID > a[href$='=5']").insertAdjacentHTML('beforebegin', 'W06');
document.querySelector("#TrollsID > a[href$='=6']").insertAdjacentHTML('beforebegin', 'W07');
document.querySelector("#TrollsID > a[href$='=7']").insertAdjacentHTML('beforebegin', 'W08');
document.querySelector("#TrollsID > a[href$='=8']").insertAdjacentHTML('beforebegin', 'W09');
document.querySelector("#TrollsID > a[href$='=9']").insertAdjacentHTML('beforebegin', 'W10');
document.querySelector("#TrollsID > a[href$='=10']").insertAdjacentHTML('beforebegin', 'W11');
document.querySelector("#TrollsID > a[href$='=11']").insertAdjacentHTML('beforebegin', 'W12');
document.querySelector("#TrollsID > a[href$='=12']").insertAdjacentHTML('beforebegin', 'W13');
document.querySelector("#TrollsID > a[href$='=13']").insertAdjacentHTML('beforebegin', 'W14');
document.querySelector("#TrollsID > a[href$='=14']").insertAdjacentHTML('beforebegin', 'W15');
document.querySelector("#TrollsID > a[href$='=15']").insertAdjacentHTML('beforebegin', 'W16');
};

I also use Stylus to make everything fewer ugly.
#TrollsID {
width: max-content!important;
}
#TrollsID a {
float: left;
padding: 0 5px;
}
#TrollsID > a:nth-last-child(3) {
border-radius: 0 0 0 8px!important;
}
#TrollsID a.wboss {
font-family: ui-monospace!important;
color: lightblue;
background: darkblue;
left: 0;
}
#TrollsID a.wboss:hover {
filter: invert(1);
}

I'm newbie and I don't know how to simplify my code.

Ответить

Войдите, чтобы ответить.