Created
December 5, 2021 23:27
-
-
Save iniznet/c837ccc9fbe6cf7ec6dd7f047f712f12 to your computer and use it in GitHub Desktop.
MangaOwl Ad & Image Gap Remover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name MangaOwl Ad & Image Gap Remover | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0.0 | |
// @description Remove ads & gap between images | |
// @author niznet | |
// @match https://mostraveller.com/* | |
// @match https://i.mangaowls.com/reader/* | |
// @icon https://www.google.com/s2/favicons?domain=mangaowls.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var delay = ( function() { | |
var timer = 0; | |
return function(callback, ms) { | |
clearTimeout (timer); | |
timer = setTimeout(callback, ms); | |
}; | |
})(); | |
delay(function(){ | |
var remove_ads = document.getElementsByClassName('ads_vertical_reader'); | |
Array.from(remove_ads).forEach( function(ads) { | |
ads.remove(); | |
}); | |
remove_ads = document.querySelectorAll("#owl_container > div"); | |
Array.from(remove_ads).forEach( function(ads) { | |
ads.remove(); | |
}); | |
var images = document.getElementsByClassName('lozad'); | |
Array.from(images).forEach( function(image) { | |
image.style.padding = '0px'; | |
}); | |
}, 5000 ); // end delay | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment