|
12 | 12 | // @description:ja オンラインで画像を強力に閲覧できるツール。ポップアップ表示、拡大・縮小、回転、一括保存などの機能を自動で実行できます |
13 | 13 | // @description:pt-BR Poderosa ferramenta de visualização de imagens on-line, que pode pop-up/dimensionar/girar/salvar em lote imagens automaticamente |
14 | 14 | // @description:ru Мощный онлайн-инструмент для просмотра изображений, который может автоматически отображать/масштабировать/вращать/пакетно сохранять изображения |
15 | | -// @version 2024.12.4.1 |
| 15 | +// @version 2024.12.7.1 |
16 | 16 | // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD////29vbKysoqKioiIiKysrKhoaGTk5N9fX3z8/Pv7+/r6+vk5OTb29vOzs6Ojo5UVFQzMzMZGRkREREMDAy4uLisrKylpaV4eHhkZGRPT08/Pz/IfxjQAAAAgklEQVQoz53RRw7DIBBAUb5pxr2m3/+ckfDImwyJlL9DDzQgDIUMRu1vWOxTBdeM+onApENF0qHjpkOk2VTwLVEF40Kbfj1wK8AVu2pQA1aBBYDHJ1wy9Cf4cXD5chzNAvsAnc8TjoLAhIzsBao9w1rlVTIvkOYMd9nm6xPi168t9AYkbANdajpjcwAAAABJRU5ErkJggg== |
17 | 17 | // @namespace https://github.com/hoothin/UserScripts |
18 | 18 | // @homepage https://github.com/hoothin/UserScripts/tree/master/Picviewer%20CE%2B |
@@ -17961,43 +17961,48 @@ ImgOps | https://imgops.com/#b#`; |
17961 | 17961 | } |
17962 | 17962 | return total; |
17963 | 17963 | } |
17964 | | - var imgs = Array.from(body.querySelectorAll('*')).concat([body]).reduceRight((total, node) => { |
17965 | | - return anylizeEle(total, node); |
17966 | | - }, []); |
17967 | | - [].forEach.call(document.head.querySelectorAll("link[rel*='icon']"), node => { |
17968 | | - if (imageReg.test(node.href)) { |
17969 | | - node.src = node.href; |
17970 | | - linkMedias.push(node); |
17971 | | - } |
17972 | | - }); |
17973 | | - [].forEach.call(document.head.querySelectorAll('meta[itemprop="image"]'), node => { |
17974 | | - if (imageReg.test(node.content)) { |
17975 | | - node.src = node.content; |
17976 | | - linkMedias.push(node); |
17977 | | - } |
17978 | | - }); |
17979 | | - imgs = imgs.reverse().sort((a, b) => { |
17980 | | - if (a.offsetParent && !b.offsetParent) { |
17981 | | - return -1; |
17982 | | - } |
17983 | | - if (!a.offsetParent && b.offsetParent) { |
17984 | | - return 1; |
17985 | | - } |
17986 | | - return 0; |
17987 | | - }).concat(linkMedias.reverse()); |
17988 | | - // 排除库里面的图片 |
17989 | | - imgs = imgs.filter(function(img){ |
17990 | | - if (img.parentNode) { |
17991 | | - if (img.parentNode.id=="icons" || img.parentNode.id=="pagetual-preload") { |
17992 | | - return false; |
17993 | | - } else if (img.parentNode.classList && img.parentNode.classList.contains("search-jumper-btn")) { |
17994 | | - return false; |
17995 | | - } else if (img.classList && img.classList.contains("pagetual")) { |
17996 | | - return false; |
| 17964 | + var imgs; |
| 17965 | + if (matchedRule.gallery) { |
| 17966 | + imgs = matchedRule.gallery(); |
| 17967 | + } else { |
| 17968 | + imgs = Array.from(body.querySelectorAll('*')).concat([body]).reduceRight((total, node) => { |
| 17969 | + return anylizeEle(total, node); |
| 17970 | + }, []); |
| 17971 | + [].forEach.call(document.head.querySelectorAll("link[rel*='icon']"), node => { |
| 17972 | + if (imageReg.test(node.href)) { |
| 17973 | + node.src = node.href; |
| 17974 | + linkMedias.push(node); |
17997 | 17975 | } |
17998 | | - } |
17999 | | - return !(container.contains(img) || (preloadContainer&&preloadContainer.contains(img))); |
18000 | | - }); |
| 17976 | + }); |
| 17977 | + [].forEach.call(document.head.querySelectorAll('meta[itemprop="image"]'), node => { |
| 17978 | + if (imageReg.test(node.content)) { |
| 17979 | + node.src = node.content; |
| 17980 | + linkMedias.push(node); |
| 17981 | + } |
| 17982 | + }); |
| 17983 | + imgs = imgs.reverse().sort((a, b) => { |
| 17984 | + if (a.offsetParent && !b.offsetParent) { |
| 17985 | + return -1; |
| 17986 | + } |
| 17987 | + if (!a.offsetParent && b.offsetParent) { |
| 17988 | + return 1; |
| 17989 | + } |
| 17990 | + return 0; |
| 17991 | + }).concat(linkMedias.reverse()); |
| 17992 | + // 排除库里面的图片 |
| 17993 | + imgs = imgs.filter(function(img){ |
| 17994 | + if (img.parentNode) { |
| 17995 | + if (img.parentNode.id=="icons" || img.parentNode.id=="pagetual-preload") { |
| 17996 | + return false; |
| 17997 | + } else if (img.parentNode.classList && img.parentNode.classList.contains("search-jumper-btn")) { |
| 17998 | + return false; |
| 17999 | + } else if (img.classList && img.classList.contains("pagetual")) { |
| 18000 | + return false; |
| 18001 | + } |
| 18002 | + } |
| 18003 | + return !(container.contains(img) || (preloadContainer&&preloadContainer.contains(img))); |
| 18004 | + }); |
| 18005 | + } |
18001 | 18006 |
|
18002 | 18007 | await sleep(0); |
18003 | 18008 | // 已经在图库里面的 |
@@ -21198,6 +21203,10 @@ ImgOps | https://imgops.com/#b#`; |
21198 | 21203 | margin-right: -5px;\ |
21199 | 21204 | padding: 3px;\ |
21200 | 21205 | }\ |
| 21206 | + .pv-pic-search-state>span>strong {\ |
| 21207 | + background: inherit;\ |
| 21208 | + color: inherit;\ |
| 21209 | + }\ |
21201 | 21210 | span.pv-pic-search-state>.pv-icon {\ |
21202 | 21211 | width: 20px;\ |
21203 | 21212 | height: 20px;\ |
@@ -24290,6 +24299,16 @@ ImgOps | https://imgops.com/#b#`; |
24290 | 24299 | if (site.ext) { |
24291 | 24300 | self.ext = site.ext; |
24292 | 24301 | } |
| 24302 | + if (site.gallery) { |
| 24303 | + let gallery = site.gallery; |
| 24304 | + self.gallery = () => { |
| 24305 | + if (typeof gallery === "string") { |
| 24306 | + return document.querySelectorAll(gallery); |
| 24307 | + } else { |
| 24308 | + return gallery(); |
| 24309 | + } |
| 24310 | + }; |
| 24311 | + } |
24293 | 24312 | if (site.video) { |
24294 | 24313 | let reMatch = typeof site.video === "string" && site.video.match(/^\/(.*)\/(\w*)$/); |
24295 | 24314 | if (reMatch) { |
|
0 commit comments