Update Image Loader Placeholder Remover to 1.16.0

- Add support for www.makeuseof.com
This commit is contained in:
blankie 2023-08-07 20:26:11 +10:00
parent e2632b4722
commit 868c06677d
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 9 additions and 2 deletions

View File

@ -3,7 +3,7 @@
// @namespace blankie-scripts
// @match http*://*/*
// @grant none
// @version 1.15.2
// @version 1.16.0
// @author blankie
// @run-at document-end
// @description Removes image loading placeholders
@ -55,7 +55,9 @@ function findUrl(element) {
// Examples of original:
// - https://www.pcgamer.com/
// - https://www.pcgamer.com/windows-95-theme-for-windows-10/
if (!attr.name.includes("lazy") && !(attr.name.includes("src") && attr.name !== "src") && !attr.name.includes("loading") && !attr.name.includes("original")) {
// Example of img-url:
// - https://www.makeuseof.com/windows-11-resize-taskbar/
if (!attr.name.includes("lazy") && !(attr.name.includes("src") && attr.name !== "src") && !attr.name.includes("loading") && !attr.name.includes("original") && !attr.name.includes("img-url")) {
continue;
}
if (!isUrlLike(attr.value)) {
@ -88,6 +90,11 @@ function unhideElement(element) {
if (style.display === "none") {
element.style.display = "block";
}
// Example: https://www.makeuseof.com/windows-11-resize-taskbar/
if (window.location.host === "www.makeuseof.com") {
element.style.paddingBottom = 0;
}
}
function getLazyloaderClasses(element) {