Update Image Loader Placeholder Remover to version 1.3

- Added image support for www.pcgamer.com
This commit is contained in:
blankie 2022-10-16 23:19:00 +07:00
parent a75a6f1d7c
commit 8213219f17
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 16 additions and 1 deletions

View File

@ -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;
};