From 8213219f17115e70cf6c8b70c74a0d41fbf8a9c6 Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 16 Oct 2022 23:19:00 +0700 Subject: [PATCH] Update Image Loader Placeholder Remover to version 1.3 - Added image support for www.pcgamer.com --- Image Loader Placeholder Remover.user.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Image Loader Placeholder Remover.user.js b/Image Loader Placeholder Remover.user.js index 3f799f7..b3f69bc 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.2 +// @version 1.3 // @author blankie // @run-at document-end // @description Removes image loading placeholders @@ -108,9 +108,24 @@ function wordpress() { } } +// https://www.pcgamer.com/ +// https://www.pcgamer.com/windows-95-theme-for-windows-10/ +function pcgamer() { + // look into video carousels? + for (element of document.querySelectorAll("img.lazy-image-van")) { + let originalUrl = element.getAttribute("data-original-mos"); + if (originalUrl === null) { + continue; + } + element.src = originalUrl; + } +} + + switch (location.host) { case "closeronline.co.uk": closeronline(); break; case "www.indiatoday.in": indiatoday(); break; case "www.vice.com": vice(); break; + case "www.pcgamer.com": pcgamer(); break; default: wordpress(); break; }; \ No newline at end of file