comparison pixiv-fanbox-unlazy.user.js @ 81:e30cd7fbee42

Actually working
author nanaya <me@nanaya.pro>
date Sat, 03 Oct 2020 02:21:56 +0900
parents 86daedfccb43
children 86da34e62d29
comparison
equal deleted inserted replaced
80:86daedfccb43 81:e30cd7fbee42
1 // ==UserScript== 1 // ==UserScript==
2 // @name pixiv fanbox no lazy loading image 2 // @name pixiv fanbox no lazy loading image
3 // @namespace https://myconan.net 3 // @namespace https://myconan.net
4 // @version 2.0.0 4 // @version 2.0.1
5 // @description Lazy loading is bad for environment. Disable it. 5 // @description Lazy loading is bad for environment. Disable it.
6 // @author nanaya 6 // @author nanaya
7 // @match https://*.fanbox.cc/* 7 // @match https://*.fanbox.cc/*
8 // @grant none 8 // @grant none
9 // @downloadURL https://hg.sr.ht/~nanaya/ec-userscripts/raw/pixiv-fanbox-unlazy.user.js?rev=tip 9 // @downloadURL https://hg.sr.ht/~nanaya/ec-userscripts/raw/pixiv-fanbox-unlazy.user.js?rev=tip
45 if (link._ecUserscript) { 45 if (link._ecUserscript) {
46 return 46 return
47 } 47 }
48 link._ecUserscript = true 48 link._ecUserscript = true
49 49
50 link.onclick = null 50 link.addEventListener('click', (event) => {
51 event.stopPropagation()
52 })
51 link.innerHTML = `<img style="width: 100%;" src="${href}" />` 53 link.innerHTML = `<img style="width: 100%;" src="${href}" />`
52 } 54 }
53 55
54 var onMutate = function (mutations) { 56 var onMutate = function (mutations) {
55 for (var mutation in mutations) { 57 for (var mutation in mutations) {