E-H Colour Conversion

Gives E-Hentai the Exhentai colour scheme.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

// ==UserScript==
// @name           E-H Colour Conversion
// @description    Gives E-Hentai the Exhentai colour scheme.
// @author         Hen Tie
// @homepage       https://hen-tie.tumblr.com/
// @namespace      https://greasyfork.org/en/users/8336
// @include        /https://(.*\.)?e-hentai.org.*/
// @exclude        https://forums.e-hentai.org/*
// @grant          none
// @icon           https://i.imgur.com/pMMVGRx.png
// @version        1.6
// ==/UserScript==

var ehCss = 'https://e-hentai.org/z/0347/g.css';
var exCss = 'https://exhentai.org/z/0347/x.css';

var addStyle = (function() {
	var style = document.createElement("style");
	style.setAttribute('data-jqstyle','ehColourConversion');
	style.appendChild(document.createTextNode("")); // WebKit hack
	document.head.appendChild(style);
	return style.sheet;
})();
function addLink(url, name) {
	var link = document.createElement('link');
	link.type = 'text/css';
	link.rel = 'stylesheet';
	link.href = url;
	if (name !== "undefined") {
		link.setAttribute('data-jqlink', name);
	}
	document.head.appendChild(link);
}
function removeLink(url) {
	if (document.querySelector('link[href="' + url + '"]')) {
		document.querySelectorAll('link[href="' + url + '"]')[0].disabled = true;
	}
}
function inlineStyle(selector, css) {
	if (document.querySelector(selector)) {
		document.querySelector(selector).style.cssText += ';' + css;
	}
}

addLink(exCss, "ehColourConversion");
removeLink(ehCss);

// bounty pages
addStyle.insertRule('.stuffbox #x {background: none; border-color: #000;}');
// events
addStyle.insertRule('#eventpane {background: #4f535b !important; border-color: #000 !important;}');
// E-H MiniMenu script compatibility
addStyle.insertRule('.nav-submenu {background: #34353b !important; border: 2px solid #8d8d8d !important;}');