e(x)hentai image resizer

try to take over the world!

Stan na 06-06-2021. Zobacz najnowsza wersja.

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         e(x)hentai image resizer
// @namespace    https://greasyfork.org/users/780477
// @version      0.2
// @description  try to take over the world!
// @match        *://e-hentai.org/s/*
// @match        *://exhentai.org/s/*
// @grant        none
// ==/UserScript==

function change_css(){
    const img = document.getElementById('img')
    img.style.width = ''
    img.style.height = '90vh'
}

(function() {
    'use strict';

    // credits https://stackoverflow.com/a/46428962
    var oldHref = document.location.href

    var
    bodyList = document.querySelector("body")

    ,observer = new MutationObserver(function(mutations) {

        mutations.forEach(function(mutation) {

            if (oldHref != document.location.href) {

                oldHref = document.location.href;

                change_css()

            }

        });

    });

    var config = {
        childList: true,
        subtree: true
    };

    observer.observe(bodyList, config);


    change_css()


})();