Update Image Loader Placeholder Remover to 1.15.1
- Properly check whether or not to unhide lazyloader parents
This commit is contained in:
parent
c4716c3373
commit
cadc19f469
|
@ -3,7 +3,7 @@
|
||||||
// @namespace blankie-scripts
|
// @namespace blankie-scripts
|
||||||
// @match http*://*/*
|
// @match http*://*/*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 1.15.0
|
// @version 1.15.1
|
||||||
// @author blankie
|
// @author blankie
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// @description Removes image loading placeholders
|
// @description Removes image loading placeholders
|
||||||
|
@ -116,7 +116,7 @@ function getLazyloaderClasses(element) {
|
||||||
// - https://theconversation.com
|
// - https://theconversation.com
|
||||||
// - https://theconversation.com/yall-that-most-southern-of-southernisms-is-going-mainstream-and-its-about-time-193265
|
// - https://theconversation.com/yall-that-most-southern-of-southernisms-is-going-mainstream-and-its-about-time-193265
|
||||||
if (className.includes("loading") || className.includes("lazy") || className.includes("responsive") || className.includes("preload") || className.includes("placeholder")) {
|
if (className.includes("loading") || className.includes("lazy") || className.includes("responsive") || className.includes("preload") || className.includes("placeholder")) {
|
||||||
classes.push(className);;
|
classes.push(className);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ function removePlaceholder(img) {
|
||||||
// - https://www.wired.com/
|
// - https://www.wired.com/
|
||||||
// - https://www.wired.com/story/researcher-fooled-a-google-ai-into-thinking-a-rifle-was-a-helicopter/
|
// - https://www.wired.com/story/researcher-fooled-a-google-ai-into-thinking-a-rifle-was-a-helicopter/
|
||||||
let lazyLoaderClasses = getLazyloaderClasses(parentElement);
|
let lazyLoaderClasses = getLazyloaderClasses(parentElement);
|
||||||
if (lazyLoaderClasses) {
|
if (lazyLoaderClasses.length !== 0) {
|
||||||
unhideElement(parentElement);
|
unhideElement(parentElement);
|
||||||
// Examples of pages with a blur applied to lazyloader classes:
|
// Examples of pages with a blur applied to lazyloader classes:
|
||||||
// - https://restofworld.org/
|
// - https://restofworld.org/
|
||||||
|
|
Loading…
Reference in New Issue