Update Image Loader Placeholder Remover to 1.21.0
- Remove empty srcsets
This commit is contained in:
parent
77b73718a6
commit
29d26e7153
|
@ -3,7 +3,7 @@
|
||||||
// @namespace blankie-scripts
|
// @namespace blankie-scripts
|
||||||
// @match http*://*/*
|
// @match http*://*/*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 1.20.0
|
// @version 1.21.0
|
||||||
// @author blankie
|
// @author blankie
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// @description Removes image loading placeholders
|
// @description Removes image loading placeholders
|
||||||
|
@ -316,6 +316,11 @@ function removePlaceholder(img) {
|
||||||
if (url) {
|
if (url) {
|
||||||
img.src = url;
|
img.src = url;
|
||||||
}
|
}
|
||||||
|
// Example of an empty srcset:
|
||||||
|
// https://blog.jwf.io/2020/04/open-source-minecraft-bukkit-gpl/
|
||||||
|
if (img.srcset && !srcset) {
|
||||||
|
img.srcset = "";
|
||||||
|
}
|
||||||
|
|
||||||
// apparently, remaining <source>s can fuck up image rendering (firefox still thinks that the <img> contains an empty image?)
|
// apparently, remaining <source>s can fuck up image rendering (firefox still thinks that the <img> contains an empty image?)
|
||||||
// https://gizmodo.com/reddit-news-blackout-protest-is-finally-over-reddit-won-1850707509
|
// https://gizmodo.com/reddit-news-blackout-protest-is-finally-over-reddit-won-1850707509
|
||||||
|
|
Loading…
Reference in New Issue