您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
*NEW* adding JavaScript for CSS here and there in the ♥Hentai Heroes game♥
当前为
// ==UserScript== // @name CSS Define // @namespace Haremheroes // @version 1.5.5 // @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 // no eslint because window. is not used /* global membersList */ // Define CSS var sheet = (function() { var style = document.createElement('style'); document.head.appendChild(style); return style.sheet; })(); var CurrentPage = window.location.pathname; var CurrentHref = window.location.href; var page = CurrentPage.split("/").pop(); //console.log(page) window.location.pathname.split("/").pop(); var pageQuest = CurrentHref.split("/")[3]; //console.log(page) window.location.pathname.split("/").shift(); var CurrentSearch = window.location.search; var pagesearch = page+CurrentSearch; //localstorage var Clubmember_deserialized = JSON.parse(localStorage.getItem("CMID")); var ClubMember_deserialized = JSON.parse(localStorage.getItem("CMNL")); var CSSCurrentQuest_deserialized = JSON.parse(localStorage.getItem("QuestID")); //Get Club Member-ID if (page == 'clubs.html') { // membersList is missing const CMemberID = membersList.map(({id_member}) => id_member) //const CMemberID = $('#members tr').map(function () {return $(this).attr('sorting_id')}).toArray(); old Code let Clubmember_serialized = JSON.stringify(CMemberID); localStorage.setItem("CMID", Clubmember_serialized); const CMemberNick = membersList.map(({nickname}) => nickname) const CMemberLvL = membersList.map(({level}) => level) let ClubMember_serialized = JSON.stringify(CMemberNick && CMemberLvL); localStorage.setItem("CMNL", ClubMember_serialized); } /*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') }) } if (page == 'home.html') { const CSSCurrentQuest = $('#homepage .continue_quest_home').map(function () {return $(this).attr('href')}).toArray(); let CSSCurrentQuest_serialized = JSON.stringify(CSSCurrentQuest); localStorage.setItem("QuestID", CSSCurrentQuest_serialized); } //Hide button "buy with kobans" for Bookshop & Giftshop if (page == 'shop.html') { //Hide button "buy with kobans" for Bookshop & Giftshop if(pagesearch == 'shop.html?type=potion' || pagesearch == 'shop.html?type=gift') { $('#shop button[rel=buy]').addClass('DONTbuy') } //Hide button "sell your Items" for Boostershop & Bookshop & Giftshop if(pagesearch == 'shop.html?type=booster' || pagesearch == 'shop.html?type=potion' || pagesearch == 'shop.html?type=gift') { $('#inventory button[rel=sell]').addClass('DONTsell') } document.querySelector("#type_item > div:nth-child(4)").onclick = function() {addDontBuy() + addDontSell()}; document.querySelector("#type_item > div:nth-child(3)").onclick = function() {addDontBuy() + addDontSell()}; document.querySelector("#type_item > div:nth-child(2)").onclick = function() {delDontBuy() + addDontSell()}; document.querySelector("#type_item > div:nth-child(1)").onclick = function() {delDontBuy() + delDontSell()}; //Show button "Buy with Kobans" if the User wants to buy with Kobans $('#shop').append('<label type="button" id="GiveMeThisItem" class=""><span id="show_terminal"><img title="Activate button" src="https://hh.hh-content.com/quest/ic_eyeopen.svg"></span></label>') document.querySelector("#GiveMeThisItem").onclick = function() {delDontBuy()}; //Show button "Sell Item" if the User wants to sell his Item $('#inventory').append('<label type="button" id="SellThisItem" class=""><span id="show_terminal"><img title="Activate button" src="https://hh.hh-content.com/quest/ic_eyeopen.svg"></span></label>') document.querySelector("#SellThisItem").onclick = function() {delDontSell()}; //function for buy and sell button function addDontBuy() { $('#shop button[rel=buy]').addClass('DONTbuy') } function delDontBuy() { $('#shop button[rel=buy]').removeClass('DONTbuy') } function addDontSell() { $('#inventory button[rel=sell]').addClass('DONTsell') } function delDontSell() { $('#inventory button[rel=sell]').removeClass('DONTsell') } } //Hide button "sell your Items" for Boostershop & Bookshop & Giftshop //Side-Quest if (page == 'side-quests.html') { $('.side-quest').has('.Read').addClass('complete') $('.side-quest').each(function() { $('.side-quest:not(:has(".slot.slot_xp"))').not('.complete').addClass('rewards').find('.Continue').removeClass('blue_button_L').addClass('purple_button_L').text('➥ Reward') }) $('.side-quests-list').prepend($(".side-quest:has('.slot.slot_xp')")) /* Normales JavaScript document.querySelectorAll('.side-quest .slot.slot_xp').forEach(function(hasXP) { document.querySelector('.side-quests-list').prepend(hasXP.parentElement.parentElement) }) */ } //document.querySelector('.side-quests-list').prepend(document.querySelectorAll('.side-quest .slot.slot_xp')) //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) }) $('#events .nc-events-prize-locations-buttons-container a').each(function() { var Goto = $(this).text().replace('Go to','➥').replace('Defeat','➥') $(this).text(Goto) }) } //PlaceOfPower /addons if (page == 'activities.html') { $('#pop_info .pop_thumb_title > span').each(function() { var HCCHKH = $(this).text().replace(/ *\([^)]*\) */g, "") $(this).text(HCCHKH) }) $('#pop_info .pop_thumb_level > span').each(function() { var LVL = $(this).text().replace("Lvl", "LvL") $(this).text(LVL) }) //just adding display: none; always (not like market) $('#pop .pop_list .pop-action-btn').addClass('hiddenPoP') //Hide PoP-button /class=hiddenPoP = eye-button $('#pop_info').append('<label type="button" id="ShowPoP" class="hiddenPoP"><span id="show_PoP_terminal"><img title="Activate button" src="https://hh2.hh-content.com/quest/ic_eyeclosed.svg"></span></label>') document.querySelector("#ShowPoP").onclick = function() {addHiddenPoP()}; //Show PoP-Button if the User wants to use them $('#pop_info').append('<label type="button" id="HiddenPoP" class=""><span id="show_PoP_terminal"><img title="Activate button" src="https://hh.hh-content.com/quest/ic_eyeopen.svg"></span></label>') document.querySelector("#HiddenPoP").onclick = function() {delHiddenPoP()}; //function for faster PoP button#pop #pop_info label#HiddenPoP function addHiddenPoP() { $('#pop .pop_list .pop-action-btn').addClass('hiddenPoP') $('#pop_info label#ShowPoP').addClass('hiddenPoP')//only for eye-button $('#pop_info label#HiddenPoP').removeClass('hiddenPoP')//only for eye-button } function delHiddenPoP() { $('#pop .pop_list .pop-action-btn').removeClass('hiddenPoP') $('#pop_info label#ShowPoP').removeClass('hiddenPoP')//only for eye-button $('#pop_info label#HiddenPoP').addClass('hiddenPoP')//only for eye-button } } //DailyGoals /addons if (page == 'activities.html') { $('#daily_goals .daily-goals-objective-status > p').each(function() { var NoMatter = $(this).text().replace(/ *\([^)]*\) */g, "") $(this).text(NoMatter) }) $('#daily_goals .daily-goals-objectives-container').append(`<div class="daily-goals-objective daily-goals-shortcut"> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/club-champion.html" hh-title="Club Champion" tooltip-id="tooltip_1"><div class="ClubChampionIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/champions-map.html" hh-title="Champion" tooltip-id="tooltip_1"><div class="ChampionIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_red Pachinkohidden" href="" hh-title="Epic Pachinko" tooltip-id="tooltip_1"><div class="PachinkoIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_orange Pachinkohidden" href="" hh-title="Mythic Pachinko" tooltip-id="tooltip_1"><div class="PachinkoIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_green Pachinkohidden" href="" hh-title="Great Pachinko" tooltip-id="tooltip_1"><div class="PachinkoIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/shop.html?type=potion" hh-title="Leveling Girl" tooltip-id="tooltip_1"><div class="LvLGirlIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/shop.html?type=potion" hh-title="Awakening Girl" tooltip-id="tooltip_1"><div class="AwakenGirlIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/shop.html?type=gift" hh-title="Upgrading Girl" tooltip-id="tooltip_1"><div class="UpgradGirlIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/shop.html" hh-title="Market" tooltip-id="tooltip_1"><div class="MarketIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue Villainhidden" href="/map.html" hh-title="Villain" tooltip-id="tooltip_1"><div class="VillainIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="`+CSSCurrentQuest_deserialized+`" hh-title="Current Quest" tooltip-id="tooltip_1"><div class="QuestIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue" href="/side-quests.html" hh-title="Side Quest" tooltip-id="tooltip_1"><div class="SideQuestIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue Leagueshidden" href="/tower-of-fame.html" hh-title="Leagues" tooltip-id="tooltip_1"><div class="LeaguesIcn CSSDefineIcn"></div></a> <a class="CSSDefine_round_button CSSDefine_button_blue Phanteonhidden" href="/pantheon.html" hh-title="Phanteon" tooltip-id="tooltip_1"><div class="PhanteonIcn CSSDefineIcn"></div></a> </div>`) $('#daily_goals .potions-total p').attr('id', 'Potion-Points') $("#daily_goals div.daily-goals-right-part > img").attr('id', 'DailyGirlRewards') const PotionsTotal = document.getElementById('Potion-Points').innerHTML const DailyGirl = "https://hh2.hh-content.com/pictures/girls/354002053/" const DailyGirl0 = "ava0-1200x.webp" const DailyGirl1 = "ava1-1200x.webp" const DailyGirl2 = "ava2-1200x.webp" const DailyGirl3 = "ava3-1200x.webp" if (PotionsTotal > 99) { $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl3) } else if (PotionsTotal > 59) { $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl2) } else if (PotionsTotal > 19) { $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl1) } else if (PotionsTotal > 0) { $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl0) } document.querySelector("#Potion-Points").onclick = function() {previewDailyGirl0()}; document.querySelector("#daily_goals .daily-goals-left-part div.progress-bar-rewards-container > div:nth-child(1) > p").onclick = function() {previewDailyGirl1()}; document.querySelector("#daily_goals .daily-goals-left-part div.progress-bar-rewards-container > div:nth-child(3) > p").onclick = function() {previewDailyGirl2()}; document.querySelector("#daily_goals .daily-goals-left-part div.progress-bar-rewards-container > div:nth-child(5) > p").onclick = function() {previewDailyGirl3()}; function previewDailyGirl0(){ $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl0) } function previewDailyGirl1(){ $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl1) } function previewDailyGirl2(){ $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl2) } function previewDailyGirl3(){ $("#DailyGirlRewards").attr('src', DailyGirl + DailyGirl3) } } //Pantheon /addons if (page == 'pantheon.html') { $('#pantheon_tab_container .temple-name-bgr .text-container > div').each(function() { var LVL = $(this).text().replace("Lvl", "LvL") $(this).text(LVL) }) } //Harem /addons if (page == '1') { $('#harem_left .right .g_infos .lvl > span').each(function() { var LVL = $(this).text().replace("Lvl", "LvL") $(this).text(LVL) }) } //HH++ script if (page = 'home.html') { $('#contains_all .hh-plus-plus-config-panel').each(function() { //just adding display: none; always (not like market) $('.hh-plus-plus-config-panel .config-setting:is([rel="core_marketHideSellButton"])').addClass('hiddenHHConfig') //Hide Config that can conflict with this script $('#contains_all .hh-plus-plus-config-panel').append('<label type="button" id="ShowHHConfig" class="hiddenHHConfig"><span id="show_HHConfig_terminal"><img title="Show Hidden Config" src="https://hh2.hh-content.com/quest/ic_eyeclosed.svg"></span></label>') //Show Config that can conflict with this script $('#contains_all .hh-plus-plus-config-panel').append('<label type="button" id="HideHHConfig" class=""><span id="show_HHConfig_terminal"><img title="Hide red Config" src="https://hh.hh-content.com/quest/ic_eyeopen.svg"></span></label>') }) document.querySelector("#ShowHHConfig").onclick = function() {addHiddenHHConfig()}; document.querySelector("#HideHHConfig").onclick = function() {delHiddenHHConfig()}; //function for faster PoP button#pop #pop_info label#HiddenPoP function addHiddenHHConfig() { $('#contains_all .hh-plus-plus-config-panel .config-setting:is([rel="core_marketHideSellButton"])').addClass('hiddenHHConfig') $('#pop_info label#ShowHHConfig').addClass('hiddenHHConfig')//only for eye-button $('#pop_info label#HideHHConfig').removeClass('hiddenHHConfig')//only for eye-button } function delHiddenHHConfig() { $('#contains_all .hh-plus-plus-config-panel.config-setting:is([rel="core_marketHideSellButton"])').removeClass('hiddenHHConfig') $('#pop_info label#ShowHHConfig').removeClass('hiddenHHConfig')//only for eye-button $('#pop_info label#HideHHConfig').addClass('hiddenHHConfig')//only for eye-button } } /*!♥Koͨmͧiͭnͥoͤ Style♥!*/