Skip to content

Commit 3331130

Browse files
committed
Update Picviewer CE+.user.js
1 parent 9758a22 commit 3331130

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// @description:ja 画像を強力に閲覧できるツール。ポップアップ表示、拡大・縮小、回転、一括保存などの機能を自動で実行できます
1313
// @description:pt-BR Poderosa ferramenta de visualização de imagens on-line, que pode pop-up/dimensionar/girar/salvar em lote imagens automaticamente
1414
// @description:ru Мощный онлайн-инструмент для просмотра изображений, который может автоматически отображать/масштабировать/вращать/пакетно сохранять изображения
15-
// @version 2025.9.30.1
15+
// @version 2025.10.5.1
1616
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD////29vbKysoqKioiIiKysrKhoaGTk5N9fX3z8/Pv7+/r6+vk5OTb29vOzs6Ojo5UVFQzMzMZGRkREREMDAy4uLisrKylpaV4eHhkZGRPT08/Pz/IfxjQAAAAgklEQVQoz53RRw7DIBBAUb5pxr2m3/+ckfDImwyJlL9DDzQgDIUMRu1vWOxTBdeM+onApENF0qHjpkOk2VTwLVEF40Kbfj1wK8AVu2pQA1aBBYDHJ1wy9Cf4cXD5chzNAvsAnc8TjoLAhIzsBao9w1rlVTIvkOYMd9nm6xPi168t9AYkbANdajpjcwAAAABJRU5ErkJggg==
1717
// @namespace https://github.com/hoothin/UserScripts
1818
// @homepage https://github.com/hoothin/UserScripts/tree/master/Picviewer%20CE%2B
@@ -24038,10 +24038,20 @@ ImgOps | https://imgops.com/#b#`;
2403824038

2403924039
if (bodyStyle.position === "static") {
2404024040
offsetParent = document.documentElement;
24041+
bodyPosi = body.getBoundingClientRect();
24042+
let docPosy = offsetParent.getBoundingClientRect();
24043+
if (bodyPosi.top == docPosy.top && bodyPosi.left == docPosy.left && bodyPosi.bottom == docPosy.bottom && bodyPosi.right == docPosy.right) {
24044+
bodyPosi = {
24045+
top: -offsetParent.scrollTop,
24046+
left: -offsetParent.scrollLeft,
24047+
bottom: offsetParent.scrollHeight - offsetParent.scrollTop,
24048+
right: offsetParent.scrollWidth - offsetParent.scrollLeft
24049+
};
24050+
}
2404124051
} else {
2404224052
offsetParent = body;
24053+
bodyPosi = offsetParent.getBoundingClientRect();
2404324054
}
24044-
bodyPosi = offsetParent.getBoundingClientRect();
2404524055

2404624056

2404724057
var scrolled=getScrolled(offsetParent);
@@ -24145,6 +24155,7 @@ ImgOps | https://imgops.com/#b#`;
2414524155
window.addEventListener('scroll',this._scrollHandler,true);
2414624156
},
2414724157
hide:function(){
24158+
lastEvent = null;
2414824159
clearTimeout(this.showTimer);
2414924160
this.floatBar.style.opacity=0.01;
2415024161
this.shown=false;
@@ -26204,7 +26215,7 @@ ImgOps | https://imgops.com/#b#`;
2620426215
if (e.relatedTarget == ImgWindowC.overlayer) return;
2620526216
if(uniqueImgWin && !uniqueImgWin.removed){
2620626217
if(checkPreview(e)){
26207-
if (!uniqueImgWin.data.img) return uniqueImgWin && uniqueImgWin.remove();
26218+
if (!uniqueImgWin.data.img || !uniqueImgWin.data.img.parentNode) return uniqueImgWin && uniqueImgWin.remove();
2620826219
let showArea=uniqueImgWin.data.img.getBoundingClientRect();
2620926220
if(e.clientX < showArea.left + 20 ||
2621026221
e.clientX > showArea.right - 20 ||

0 commit comments

Comments
 (0)