# HG changeset patch # User nanaya # Date 1671885210 -32400 # Node ID 3fded109e23a0f4a31f30bed784bc3eb0798fe93 # Parent e21710f5dd7b9e4dd975f34e96a4624e3951dd32 Also run on own node diff -r e21710f5dd7b -r 3fded109e23a melonbooks-unlazy.user.js --- a/melonbooks-unlazy.user.js Sat Dec 24 21:31:42 2022 +0900 +++ b/melonbooks-unlazy.user.js Sat Dec 24 21:33:30 2022 +0900 @@ -4,7 +4,7 @@ // @match https://www.melonbooks.co.jp/* // @grant none // @run-at document-start -// @version 1.0.3 +// @version 1.0.4 // @author nanaya // @description replace lazy loaded images with just images // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/melonbooks-unlazy.user.js @@ -13,6 +13,8 @@ 'use strict' function fix (image) { + if (!image.classList.contains('lazyload')) return + const src = image.dataset.src if (src == null || src === '') return @@ -26,6 +28,7 @@ for (const mutation of mutations) { for (const node of mutation.addedNodes) { if (node instanceof window.HTMLElement) { + fix(node) for (const image of node.querySelectorAll('.lazyload')) { fix(image) }