diff melonbooks-unlazy.user.js @ 99:b44d5cb661c5

Also check for empty string
author nanaya <me@nanaya.net>
date Sat, 24 Dec 2022 06:55:55 +0900
parents 3e5f1fa9ed52
children 3fded109e23a
line wrap: on
line diff
--- a/melonbooks-unlazy.user.js	Fri Dec 23 19:58:14 2022 +0900
+++ b/melonbooks-unlazy.user.js	Sat Dec 24 06:55:55 2022 +0900
@@ -4,7 +4,7 @@
 // @match       https://www.melonbooks.co.jp/*
 // @grant       none
 // @run-at      document-start
-// @version     1.0.2
+// @version     1.0.3
 // @author      nanaya
 // @description replace lazy loaded images with just images
 // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/melonbooks-unlazy.user.js
@@ -15,7 +15,7 @@
 function fix (image) {
   const src = image.dataset.src
 
-  if (src == null) return
+  if (src == null || src === '') return
 
   image.classList.remove('lazyload')
   image.src = image.dataset.src