From 29d26e7153c720dd197534baa4dcfde694b180a7 Mon Sep 17 00:00:00 2001 From: blankie Date: Tue, 12 Sep 2023 20:01:25 +1000 Subject: [PATCH] Update Image Loader Placeholder Remover to 1.21.0 - Remove empty srcsets --- Image Loader Placeholder Remover.user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Image Loader Placeholder Remover.user.js b/Image Loader Placeholder Remover.user.js index d33bfe9..41156f2 100644 --- a/Image Loader Placeholder Remover.user.js +++ b/Image Loader Placeholder Remover.user.js @@ -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 s can fuck up image rendering (firefox still thinks that the contains an empty image?) // https://gizmodo.com/reddit-news-blackout-protest-is-finally-over-reddit-won-1850707509