Mercurial > ec-userscripts
comparison pixiv-fanbox-unlazy.user.js @ 80:86daedfccb43
Remove click event on the link itself
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 03 Oct 2020 02:15:58 +0900 |
parents | e4b970501e8e |
children | e30cd7fbee42 |
comparison
equal
deleted
inserted
replaced
79:e4b970501e8e | 80:86daedfccb43 |
---|---|
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 1.0.1 | 4 // @version 2.0.0 |
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.innerHTML = `<img style="width: 100%;" src="${href}" />` | 51 link.innerHTML = `<img style="width: 100%;" src="${href}" />` |
51 } | 52 } |
52 | 53 |
53 var onMutate = function (mutations) { | 54 var onMutate = function (mutations) { |
54 for (var mutation in mutations) { | 55 for (var mutation in mutations) { |