CSS Define

*NEW* adding JavaScript for CSS here and there in the ♥Hentai Heroes game♥

Stan na 26-09-2021. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         CSS Define
// @namespace    Haremheroes
// @version      1.1.0
// @description  *NEW* adding JavaScript for CSS here and there in the ♥Hentai Heroes game♥
// @author       KominoStyle
// @match        http*://nutaku.haremheroes.com/*
// @match        http*://*.hentaiheroes.com/*
// @run-at	     document-end
// @grant        none
// @license      MIT
// ==/UserScript==

/*==========================================================*
CSS-Addon:
Stylus: https://add0n.com/stylus.html
*-----------------------------------------------------------*
CSS-Script:
https://userstyles.world/style/960/hentai-heroes-css-define
*==========================================================*/
/* =========
	GENERAL
   ========= */

// Define jQuery
var $ = window.jQuery;


// Define CSS
var sheet = (function() {
    var style = document.createElement('style');
    document.head.appendChild(style);
    return style.sheet;
})();


var CurrentPage = window.location.pathname;
var page = CurrentPage.split("/").pop(); //console.log(page)


//localstorage
var Clubmember_deserialized = JSON.parse(localStorage.getItem("CMID"));


//Get Club Member-ID
if (page == 'clubs.html') {
const CMemberID = $('#members tr').map(function () {return $(this).attr('sorting_id')}).toArray();

let Clubmember_serialized = JSON.stringify(CMemberID);

localStorage.setItem("CMID", Clubmember_serialized);
}

//Leagues ID check
if (page == 'tower-of-fame.html') {
    Clubmember_deserialized.forEach(Member => { //console.log(Member)
        $('tr[sorting_id='+Member+']').addClass('IsMember')
    })
}

//Contest ID check
if (page == 'activities.html') {
    Clubmember_deserialized.forEach(Member => { console.log(Member)
        $('tr[sorting_id='+Member+']').addClass('IsMember')
    })
}

//Side-Quest
if (page == 'side-quests.html') {
    $('.side-quest').has('.Read').addClass('complete')
}


//PoA changes
if (page == 'event.html') {
    //Give girls more space if all Mission done
    $('#poa-content:not(:has(".selected"))').each(function() {
        $('#events #poa-content .animated-girl-display').addClass('MoreSpace')
        $('#events #poa-content .girl-avatar').addClass('MoreSpace')
    })
    //If "PoA reward Container" get clicked, remove more space for girls
    $("#nc-poa-tape-rewards .nc-poa-reward-container").click(function() {
        $('#events #poa-content .animated-girl-display').removeClass('MoreSpace')
        $('#events #poa-content .girl-avatar').removeClass('MoreSpace')
    })
    //Add Club Champion if "Go to Champion"
    $('#poa-content .buttons:has(button[data-href="/champions-map.html"])').append('<button data-href="club-champion.html" class="blue_button_L">Go to Club Champions</button>')

    //"Go to" change to "➥"
    $('#poa-content .buttons button').each(function() {
        var Goto = $(this).text().replace('Go to','➥').replace('Defeat','➥')
        $(this).text(Goto)
    })

}