Sleazy Fork is available in English.

Exhentai : Misc Edition

Change some elements

Versión del día 20/06/2018. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Exhentai : Misc Edition
// @namespace    Exhentai
// @version      1.0.6
// @description  Change some elements
// @icon        data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAABmBhHV14kpAAAAAXRSTlMAQObYZgAAADFJREFUeAFjIB4w//9BLPWBgSLq//HH/w8QQYE18GOj6hgwKCBCpcDOZQaZQpgiGgAA0dhUnSJVLdEAAAAASUVORK5CYII=
// @author       Catgrills
// @include      https://exhentai.org/*
// @grant        none
// ==/UserScript==

// Exhentai Illustration Details
var name = document.getElementsByClassName('id2');
var doujin = document.getElementsByClassName('id3');
var info = document.getElementsByClassName('id4');
for(var i=0; i < doujin.length; i++) {
    var detail = document.createElement('div');
    detail.id = 'detail_box';
    var detail_cat = document.createElement('div');
    detail_cat.id = 'detail_box_cat';
    detail_cat.innerHTML = info[i].getElementsByClassName('id41')[0].getAttribute('title');
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Doujinshi') {
       detail_cat.style.color = name[i].style.color = '#EB6361';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Manga') {
       detail_cat.style.color = name[i].style.color = '#EEE657';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Artist CG Sets') {
       detail_cat.style.color = name[i].style.color = '#EBBD63';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Game CG Sets') {
       detail_cat.style.color = name[i].style.color = '#5C9F97';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Western') {
       detail_cat.style.color = name[i].style.color = '#F7E999';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Image Sets') {
       detail_cat.style.color = name[i].style.color = '#47D2E9';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Non-H') {
       detail_cat.style.color = name[i].style.color = '#ECF0F1';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Cosplay') {
       detail_cat.style.color = name[i].style.color = '#AA8C91';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Asian Porn') {
       detail_cat.style.color = name[i].style.color = '#FDE1F7';
    }
    if(info[i].getElementsByClassName('id41')[0].getAttribute('title') == 'Misc') {
       detail_cat.style.color = name[i].style.color = '#FFF0D6';
    }
    var detail_page = document.createElement('div');
    detail_page.id = 'detail_box_page';
    detail_page.innerHTML = info[i].getElementsByClassName('id42')[0].innerHTML;
    var detail_rate = document.createElement('div');
    detail_rate.id = 'detail_box_rate';
    detail_rate.style = 'background-image: url("https://exhentai.org/img/rt.png"); background-repeat: no-repeat; height: 16px; width: 80px';
    detail_rate.style.backgroundPosition = info[i].getElementsByClassName('id43')[0].style.backgroundPosition;
    detail.appendChild(detail_cat);
    detail.appendChild(detail_page);
    detail.appendChild(detail_rate);
    doujin[i].getElementsByTagName('a')[0].appendChild(detail);
    detail.style = 'height: 100%; width: 100%; position: absolute; top: 0px; z-index: 999;';
}

// Exhentai Home Searchbox button
var header = document.getElementById('nb');
var box = document.getElementById('searchbox');
var advanced = document.getElementsByClassName('itss');
if(box) {
    var trigger_box = document.createElement('button');
    trigger_box.id = 'trigger-box-btn';
    var text_trigger_box = document.createTextNode('Search');
    trigger_box.appendChild(text_trigger_box);
    header.appendChild(trigger_box);
    trigger_box.onclick = function() {
        box.getElementsByTagName('form')[0].style.visibility = 'visible';
    };
    var close = document.createElement('button');
    close.id = 'close-btn';
    var text_close = document.createTextNode('c');
    close.appendChild(text_close);
    box.getElementsByTagName('form')[0].appendChild(close);
    close.onclick = function() {
        box.getElementsByTagName('form')[0].style.visibility = 'hidden';
    };
    var thumbnail = document.getElementsByTagName('img');
    for(var i=0; i < thumbnail.length; i++) {
        thumbnail[i].src = thumbnail[i].src.replace('_l','_250');
    }
}

// Exhentai Favorite Box
var box2 = document.getElementsByClassName('nosel');
var fav = document.getElementsByClassName('fp');
if(fav[0]) {
    var trigger_box_2 = document.createElement('button');
    trigger_box_2.id = 'trigger-box-btn-2';
    var text_trigger_box_2 = document.createTextNode('Categories');
    trigger_box_2.appendChild(text_trigger_box_2);
    header.appendChild(trigger_box_2);
    trigger_box_2.onclick = function() {
        box2[0].style.display = 'block';
    };
    var close = document.createElement('button');
    close.id = 'close-btn';
    var text_close = document.createTextNode('c');
    close.appendChild(text_close);
    box2[0].appendChild(close);
    close.onclick = function() {
        box2[0].style.display = 'none';
    };
    var thumbnail = document.getElementsByTagName('img');
    for(var i=0; i < thumbnail.length; i++) {
        thumbnail[i].src = thumbnail[i].src.replace('_l','_250');
    }
}

// Exhentai Gallery Sidebar Button
var title = document.getElementById('gd2');
var block = document.getElementById('gd5');
var middle = document.getElementById('gmid');
var trigger = document.createElement('button');
trigger.id = 'trigger-btn';
var text_trigger = document.createTextNode('MENU');
trigger.appendChild(text_trigger);
title.appendChild(trigger);
var value = false;
trigger.onclick = function() {
    if(value == false) {
       value = true;
       block.style.display = 'block';
       middle.style.zIndex = '1';
    }
    else if(value == true) {
       value = false;
       block.style.display = 'none';
       middle.style.zIndex = '99';
    }
};