E-H Fjords

Redirects galleries automatically.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name           E-H Fjords
// @description    Redirects galleries automatically.
// @author         Hen Tie
// @homepage       https://hen-tie.tumblr.com/
// @namespace      https://greasyfork.org/en/users/8336
// @include        /https://e-hentai.org\/[sg]\/.*/
// @icon           https://i.imgur.com/pMMVGRx.png
// @version        1.0
// ==/UserScript==
// based on Mexiguy's Fjords Begone (sleazyfork.org/en/scripts/2053)

//redirect behaviour
var delayRedirect = false; //true=delayed with message, false=instant
var delayTime = 2000; //in milliseconds

function redirectPage() {
	var redirectUrl = document.location.toString().replace("e-hentai", "exhentai");
	document.location = redirectUrl;
}

if (document.title.indexOf("Gallery Not Available") >= 0) {
	//break homepage redirect timeout
	document.getElementById('continue').remove();
	//custom redirect message
	document.getElementsByTagName('p')[1].remove();
	document.getElementsByClassName('d')[0].innerHTML += "<P><em>E-H Fjords is redirecting you now…</em></p>";
	if (delayRedirect) {
		//custom title
		document.title = "E-H Fjords: Redirecting";
		//delay then redirect page
		setTimeout(redirectPage, delayTime);
	} else {
		redirectPage();
	}
}