exhentai flow viewer

This scripts helps you to view a gallery in a single page, from up to down.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         exhentai flow viewer
// @namespace    http://tampermonkey.net/
// @version      1.1
// @author       PokemonMaster802
// @match        https://exhentai.org/s/*
// @description  This scripts helps you to view a gallery in a single page, from up to down.
// @locale       en
// ==/UserScript==

var container;  // The <div> to hold images, intending to inherit it's style.
var parser;

function getNext(currURL, currDOC) {
    'use strict';
    var nextURL = currDOC.getElementById('next').href;

    // The last page has the next url directing to itself.
    if (currURL === nextURL) {
        console.log('Reach the last page');
        return;
    }

    // Prepare http request for the next page.
    var nextPage = new XMLHttpRequest();
    nextPage.onreadystatechange = function() {
        if (nextPage.readyState == 4) {
            if (nextPage.status == 200) {
                var doc = parser.parseFromString(nextPage.responseText, 'text/html');
                var img = doc.getElementById('img');
                img.style.paddingTop = '1em';
                container.append(img);
                setTimeout(getNext, 500, nextURL, doc);
            }
            else {
                console.log('Failed to fetch ' + nextURL + ': ' + nextPage.status);
            }
        }
    };
    nextPage.open("GET", nextURL, false);
    nextPage.send();
}

(function() {
    parser = new DOMParser();
    container = document.getElementById('i3');
    getNext(document.URL, document);
})();