CSS Define

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

Fra 18.09.2021. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         CSS Define
// @namespace    Haremheroes
// @version      1.0.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"));

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

//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')
    })
}