Update Image Loader Placeholder Remover to 1.6
- Add support for www.bleepingcomputer.com
This commit is contained in:
parent
37b01e845d
commit
74be882452
|
@ -3,7 +3,7 @@
|
||||||
// @namespace blankie-scripts
|
// @namespace blankie-scripts
|
||||||
// @match http*://*/*
|
// @match http*://*/*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 1.5
|
// @version 1.6
|
||||||
// @author blankie
|
// @author blankie
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// @description Removes image loading placeholders
|
// @description Removes image loading placeholders
|
||||||
|
@ -141,6 +141,30 @@ function theautopian() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://www.bleepingcomputer.com/
|
||||||
|
// https://www.bleepingcomputer.com/news/microsoft/windows-11-snipping-tool-privacy-bug-exposes-cropped-image-content/
|
||||||
|
function bleepingcomputer() {
|
||||||
|
for (element of document.querySelectorAll(".b-lazy")) {
|
||||||
|
const addLink = element.parentNode.tagName !== "A";
|
||||||
|
const dataSrc = element.getAttribute("data-src");
|
||||||
|
if (dataSrc === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const url = new URL(dataSrc, 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;
|
||||||
|
@ -148,5 +172,6 @@ switch (location.host) {
|
||||||
case "www.pcgamer.com": pcgamer(); break;
|
case "www.pcgamer.com": pcgamer(); break;
|
||||||
case "www.wired.com": wired(); break;
|
case "www.wired.com": wired(); break;
|
||||||
case "www.theautopian.com": theautopian(); break;
|
case "www.theautopian.com": theautopian(); break;
|
||||||
|
case "www.bleepingcomputer.com": bleepingcomputer(); break;
|
||||||
default: wordpress(); break;
|
default: wordpress(); break;
|
||||||
};
|
};
|
Loading…
Reference in New Issue