From 62cbadd1ae1e23a654c1ea391618c2e547e5f645 Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 12 Aug 2023 21:24:29 +1000 Subject: [PATCH] Update Image Loader Placeholder Remover to 1.16.2 - Fix support for URLs that start with ./ or ../ --- Image Loader Placeholder Remover.user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Image Loader Placeholder Remover.user.js b/Image Loader Placeholder Remover.user.js index 28d75ff..e6028dd 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.16.1 +// @version 1.16.2 // @author blankie // @run-at document-end // @description Removes image loading placeholders @@ -12,7 +12,9 @@ "use strict"; function isUrlLike(url) { - return url && /^(?:\/|https?:\/\/)\S+$/.test(url); + // Example of ./path: + // - https://projects.apnews.com/features/2023/missing-students-chronic-absenteeism/index.html + return url && /^(?:https?:\/\/|\.{0,2}\/)\S+$/.test(url); } function findUrl(element) { if (window.location.host === "www.vice.com") {