HentaiFox Loader

Load all the manga on MangaFox onto one scrollable page

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

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

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ć!)

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ć!)

// ==UserScript==
// @name         HentaiFox Loader
// @namespace    http://hentaifox.com/
// @version      1.1
// @description  Load all the manga on MangaFox onto one scrollable page
// @author       testacda1
// @match *://*.hentaifox.com/g/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=hentaifox.com
// @grant        none
// @run-at       document-end
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';
    let pages = document.getElementsByClassName("total_pages")[1].innerText;
    let currentPage = document.getElementsByClassName("current")[1].innerText;
    let imageServer = document.querySelector("#gimg").getAttribute("data-src").replace("https://i.hentaifox.com/", "");
    imageServer = imageServer.substring(0, imageServer.lastIndexOf("/") + 1);
    let parentNode = document.querySelector(".next_img");
    for (let i = parseInt(currentPage) + 1; i <= pages; i++) {
        let img = document.createElement("img");
        img.src = "https://i.hentaifox.com/" + imageServer + i + ".jpg";
        img.style.maxWidth = "1280px";
        img.style.maxHeight = "1816px";
        img.style.margin = "0 auto";
        img.style.display = "block";
        parentNode.appendChild(img);
    }
})();