Hentai Heroes image viewer

Display images of any harem girl!

اعتبارا من 26-04-2020. شاهد أحدث إصدار.

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Hentai Heroes image viewer
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Display images of any harem girl!
// @author       randomfapper34
// @match		 https://nutaku.haremheroes.com/*
// @match		 https://nutaku.gayharem.com/**
// @match		 https://thrix.hentaiheroes.com/*
// @match	     https://eroges.hentaiheroes.com/*
// @match        https://www.hentaiheroes.com/*
// @match        http://test.hentaiheroes.com/*
// @match        https://test.hentaiheroes.com/*
// @grant        none
// ==/UserScript==

var $ = window.jQuery;
var CurrentPage = window.location.pathname;

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

// current page: Harem
if (CurrentPage.indexOf('harem') != -1)
{
    var haremRight = $('#harem_right');
    haremCss();

    $( ".girls_list div[id_girl]" ).click(function() {
        var girlId = $(this).children('[girl]').attr('girl');
        var girlGrades = $(this).find('.graded').children().length;
        var girlClass = $(this).find('.icon').attr('carac');
        updateInfo(girlId, girlGrades, girlClass);
    });

    updateInfo(0, 0, 0);

    function updateInfo(girlId, girlGrades, girlClass) {
        setTimeout(function () {
            haremRight.children('[girl]').each( function() {
                if (girlId == 0) girlId = $(this).attr('girl');
                if (girlGrades == 0) girlGrades = girl.nb_grades;

                var girl = girlsDataList[girlId];

                var allImages = '';
                for (var i = 0; i <= girlGrades; i++) {
                    var selectedAvatar = $(this).find('.diamond.selected').attr('grade');
                    if (selectedAvatar === undefined) {
                        selectedAvatar = '/avb0';
                    }else{
                        selectedAvatar = '/ava' + selectedAvatar;
                    }
                    var baseLink = 'https://hh2.hh-content.com/pictures/girls/' + girlId + selectedAvatar + '.png';
                    var imgLink = 'https://hh2.hh-content.com/pictures/girls/' + girlId + '/ava' + i + '.png';
                    //var fullLink = '<a href="' + imgLink + '" target="_blank">' + i + ' </a>';
                    var fullLink = '<span link="' + imgLink + '" baseLink="' + baseLink + '">' + i + ' </span>';
                    allImages += fullLink;
                }

                //girl not yet in harem
                if(!girl.own){
                    $(this).find('.middle_part').css('margin', '0');
                    $(this).find('.dialog-box').after('<h3>' + girl.Name + '<span carac="class' + girlClass + '"></span></h3>');
                    $(this).find('h3').after('<div class="WikiLink">id: ' + girlId + ' <a href="https://harem-battle.club/wiki/Harem-Heroes/HH:' + girl.Name + '" target="_blank">(wiki page)</a></div>');
                    $(this).find('.WikiLink').append('<br/><div class="girl_images">images: ' + allImages + '</div>');
                    $(this).find('img.avatar').wrap('<div class="avatar-box"></div>');
                }

                //girl in harem
                if(girl.own){
                    $(this).find('h3').after('<div class="WikiLink">id: ' + girlId + ' <a href="https://harem-battle.club/wiki/Harem-Heroes/HH:' + girl.Name + '" target="_blank">(wiki page)</a></div>');
                    $(this).find('.WikiLink').append('<br/><div class="girl_images">images: ' + allImages + '</div>');
                    var girlOwnedImage = $(this).find('.avatar-box');
                    girlOwnedImage.css('margin-top', '0px');
                    girlOwnedImage.css('height', '390px');
                }

                $(this).find('.girl-rarity').remove();

                $( ".girl_images span" ).mouseenter(function() {
                    var mainParent = $(this).closest('.middle_part');
                    $(this).css('-webkit-text-stroke', '0.75px #FE00FE');
                    var girlAvatar = mainParent.find('img.avatar');
                    var girlAvatarLink = $(this).attr('link');
                    girlAvatar.attr('src', girlAvatarLink);
                });

                $( ".girl_images span" ).mouseleave(function() {
                    $(this).css('-webkit-text-stroke', '0px #FE00FE');
                });

                $( ".girl_images" ).mouseup(function() {
                    var mainParent = $(this).closest('.middle_part');
                    var girlAvatar = mainParent.find('img.avatar');
                    var girlAvatarLink = $(this).find('span').attr('baseLink');
                    girlAvatar.attr('src', girlAvatarLink);
                });

            });
        }, 0);
    }
}

function haremCss(){
    sheet.insertRule('#harem_right .WikiLink a {'
                     + 'color: #87CEFA;'
                     + 'text-decoration: none; }');

    sheet.insertRule('#harem_right .WikiLink a:hover {'
                     + 'color: #B14;'
                     + 'text-decoration: underline; }');

    sheet.insertRule('#harem_right .WikiLink {'
                     + 'font-size: 12px; }');

    sheet.insertRule('#harem_right .WikiLinkDialogbox a {'
                     + 'text-decoration: none;'
                     + 'color: #24a0ff !important; }');
}