E-H Colour Conversion

Gives E-Hentai the ExHentai colour scheme

Stan na 11-04-2019. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

Advertisement:

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Advertisement:

// ==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.3
// ==/UserScript==

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

function addLink(fileName) {
	var link = document.createElement('link');
	link.type = 'text/css';
	link.rel = 'stylesheet';
	link.href = fileName;
	link.setAttribute('data-jqstyle','ehColourConversion');
	document.head.appendChild(link);
}
function removeLink(filename) {
	document.querySelectorAll('link[href="'+filename+'"]')[0].disabled = true;
}
function inlineStyle(selector, css) {
	document.querySelectorAll(selector)[0].style.cssText += ';' + css;
}

addLink(exCss);

if (document.querySelector('link[href="'+ehCss[0]+'"]')) {
	removeLink(ehCss[0]);
} else if (document.querySelector('link[href="'+ehCss[1]+'"]')) {
	removeLink(ehCss[1]);
}

inlineStyle('.stuffbox #x', 'background: none; border-color: #000;');
inlineStyle('#eventpane', 'background: #4f535b; border-color: #000;');