Update Image Loader Placeholder Remover to 1.8

- Add support for vulcan.io
This commit is contained in:
blankie 2023-06-11 18:04:02 +07:00
parent 1f702ea34a
commit 4cb86951c2
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 22 additions and 1 deletions

View File

@ -3,7 +3,7 @@
// @namespace blankie-scripts // @namespace blankie-scripts
// @match http*://*/* // @match http*://*/*
// @grant none // @grant none
// @version 1.7 // @version 1.8
// @author blankie // @author blankie
// @run-at document-end // @run-at document-end
// @description Removes image loading placeholders // @description Removes image loading placeholders
@ -173,6 +173,26 @@ function securelist() {
document.head.appendChild(style); document.head.appendChild(style);
} }
// https://vulcan.io/blog/
// https://vulcan.io/blog/ai-hallucinations-package-risk
function vulcan() {
for (let element of document.querySelectorAll("img[nitro-lazy-src]")) {
const addLink = element.parentNode.tagName !== "A";
const url = new URL(element.getAttribute("nitro-lazy-src"), location);
if (addLink) {
const newElement = element.cloneNode();
newElement.src = url.href;
const wrapper = document.createElement("a");
wrapper.href = url.href;
wrapper.appendChild(newElement);
element.replaceWith(wrapper);
} else {
element.src = url.href;
}
}
}
switch (location.host) { switch (location.host) {
case "closeronline.co.uk": closeronline(); break; case "closeronline.co.uk": closeronline(); break;
case "www.indiatoday.in": indiatoday(); break; case "www.indiatoday.in": indiatoday(); break;
@ -182,5 +202,6 @@ switch (location.host) {
case "www.theautopian.com": theautopian(); break; case "www.theautopian.com": theautopian(); break;
case "www.bleepingcomputer.com": bleepingcomputer(); break; case "www.bleepingcomputer.com": bleepingcomputer(); break;
case "securelist.com": securelist(); break; case "securelist.com": securelist(); break;
case "vulcan.io": vulcan(); break;
default: wordpress(); break; default: wordpress(); break;
}; };