Update Image Loader Placeholder Remover to 1.2
Wordpress images are now handled
This commit is contained in:
parent
b535a4aeeb
commit
59fe815206
|
@ -1,11 +1,9 @@
|
|||
// ==UserScript==
|
||||
// @name Image Loader Placeholder Remover
|
||||
// @namespace blankie-scripts
|
||||
// @match http*://closeronline.co.uk/*
|
||||
// @match http*://www.indiatoday.in/*
|
||||
// @match http*://www.vice.com/*
|
||||
// @match http*://*/*
|
||||
// @grant none
|
||||
// @version 1.1
|
||||
// @version 1.2
|
||||
// @author blankie
|
||||
// @run-at document-end
|
||||
// @description Removes image loading placeholders
|
||||
|
@ -98,8 +96,21 @@ function vice() {
|
|||
}
|
||||
}
|
||||
|
||||
// https://daramiblog.com/
|
||||
// https://daramiblog.com/how-to-group-irregular-verbs-for-more-efficient-learning/
|
||||
function wordpress() {
|
||||
for (element of document.querySelectorAll("img.lazyload.wp-post-image")) {
|
||||
if (element.attributes["data-src"] === undefined || element.attributes["data-src"].value.length <= 0) {
|
||||
continue;
|
||||
}
|
||||
element.src = element.attributes["data-src"].value;
|
||||
element.style.opacity = 100;
|
||||
}
|
||||
}
|
||||
|
||||
switch (location.host) {
|
||||
case "closeronline.co.uk": closeronline(); break;
|
||||
case "www.indiatoday.in": indiatoday(); break;
|
||||
case "www.vice.com": vice(); break;
|
||||
default: wordpress(); break;
|
||||
};
|
Loading…
Reference in New Issue