Mangahub Page Cleaner

Automatically removes spaces between pages caused by page count (e.g. 1/10, 2/10, 3/10 below each image) on Mangahub.io

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Mangahub Page Cleaner
// @author      Totem#0001
// @description Automatically removes spaces between pages caused by page count (e.g. 1/10, 2/10, 3/10 below each image) on Mangahub.io
// @match       *://*.mangahub.io/*
// @run-at      document-end
// @version     1.0.0
// @grant       none
// @require     http://code.jquery.com/jquery-3.4.1.min.js
// @license     Creative Commons Attribution 4.0 International Public License; http://creativecommons.org/licenses/by/4.0/
// @namespace https://greasyfork.org/users/1078112
// ==/UserScript==

(function() {
    'use strict';

    var $ = window.jQuery;
    function waitForElm(selector) {
        return new Promise(resolve => {
            if (document.querySelector(selector)) {
                return resolve(document.querySelector(selector));
            }

            const observer = new MutationObserver(mutations => {
                if (document.querySelector(selector)) {
                    resolve(document.querySelector(selector));
                    observer.disconnect();
                }
            });

            observer.observe(document.body, {
                childList: true,
                subtree: true
            });
        });
    }

    waitForElm('._3w1ww').then((elm) => {
        $('._3w1ww').each(function() {
            this.remove()
        })
    });

    setInterval(function() {
        $('._3w1ww').each(function() {
            this.remove()
        })
    }, 100);
})();