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
|
||||
// @match http*://*/*
|
||||
// @grant none
|
||||
// @version 1.20.0
|
||||
// @version 1.21.0
|
||||
// @author blankie
|
||||
// @run-at document-end
|
||||
// @description Removes image loading placeholders
|
||||
|
@ -316,6 +316,11 @@ function removePlaceholder(img) {
|
|||
if (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?)
|
||||
// https://gizmodo.com/reddit-news-blackout-protest-is-finally-over-reddit-won-1850707509
|
||||
|
|
Loading…
Reference in New Issue