ExHentai - Preload next page

Loosely inspired by "Handy ExHentai" script. Now loads more pages by nesting iFrames.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name		ExHentai - Preload next page
// @version	1.1
// @namespace	exhentai-preload-page
// @author	BlindJoker
// @homepage	https://github.com/BlindJoker
// @description	Loosely inspired by "Handy ExHentai" script. Now loads more pages by nesting iFrames.
// @match		http://exhentai.org/s/*
// @match		http://g.e-hentai.org/s/*
// @run-at		document-end
// @grant		none
// ==/UserScript==
/*
* Let the user scripts or content scripts running in an annoymous function.
*/
(function (window) {
	"use strict";

	var pnext = document.getElementById("next").href;

	// Prevents possible infinite loadings
	if(window.self !== window.top && window.location.href == pnext) {
		console.log("finished loading everything");
		return;
	}

	var nframe = document.createElement("iframe");
	nframe.src = pnext;
	nframe.id = "nframe";
	nframe.style.width = "1px";
	nframe.style.height = "1px";
	nframe.style.border = "none";

	document.getElementById("img").addEventListener('load', function() {
		document.body.appendChild(nframe);
	});

	var script = document.createElement('script');

	script.type = "text/javascript";
	script.innerHTML =  	"var uweo = update_window_extents;" +
			"update_window_extents = function() {" +
			"	uweo();" +
			"	document.getElementById('img').addEventListener('load', function() {" +
			"		document.getElementById('nframe').src = document.getElementById('next').href;" +
			"	});" +
			"}";

	document.head.appendChild(script);
}) (window);