// ==UserScript== // @name MangaDexFit // @namespace MangaDexFit // @version 1.0 // @description Fit images to max width // @author Australis // @match https://mangadex.org/chapter/* // @run-at document-end // @grant none // @downloadURL none // ==/UserScript== let i = setInterval(dojob, 100); function dojob() { let img = document.querySelector("img.noselect"); if(img && img.naturalWidth) // loaded { let sheet = document.createElement('style'); sheet.innerHTML = ".reader-images img { height: auto; width: 100vw !important; margin: auto; object-fit: contain !important;}"; document.body.appendChild(sheet); // fix images not being 100% wide clearInterval(i); } }