Skip to content

Commit 9e82848

Browse files
committed
Update Picviewer CE+.user.js
1 parent b6146bf commit 9e82848

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// @grant GM.notification
4747
// @grant unsafeWindow
4848
// @require https://update.greasyfork.org/scripts/6158/23710/GM_config%20CN.js
49-
// @require https://update.greasyfork.org/scripts/438080/1643244/pvcep_rules.js
49+
// @require https://update.greasyfork.org/scripts/438080/1652811/pvcep_rules.js
5050
// @require https://update.greasyfork.org/scripts/440698/1427239/pvcep_lang.js
5151
// @downloadURL https://greasyfork.org/scripts/24204-picviewer-ce/code/Picviewer%20CE+.user.js
5252
// @updateURL https://greasyfork.org/scripts/24204-picviewer-ce/code/Picviewer%20CE+.meta.js
@@ -25473,17 +25473,6 @@ ImgOps | https://imgops.com/#b#`;
2547325473
} else if (target.parentNode.nodeName.toUpperCase() == 'IMG') {
2547425474
target = target.parentNode;
2547525475
found = true;
25476-
} else if (prefs.floatBar.listenBg && hasBg(target.parentNode)) {
25477-
target = target.parentNode;
25478-
let src = targetBg, nsrc = src, noActual = true, type = "scale";
25479-
result = {
25480-
src: nsrc,
25481-
type: type,
25482-
imgSrc: src,
25483-
noActual:noActual,
25484-
img: target
25485-
};
25486-
found = true;
2548725476
}
2548825477
}
2548925478
if (!found) {
@@ -25569,6 +25558,18 @@ ImgOps | https://imgops.com/#b#`;
2556925558
let imgs = target.shadowRoot.querySelectorAll('img');
2557025559
if (imgs.length === 1) target = imgs[0];
2557125560
}
25561+
if (!found && prefs.floatBar.listenBg && hasBg(target.parentNode)) {
25562+
target = target.parentNode;
25563+
let src = targetBg, nsrc = src, noActual = true, type = "scale";
25564+
result = {
25565+
src: nsrc,
25566+
type: type,
25567+
imgSrc: src,
25568+
noActual:noActual,
25569+
img: target
25570+
};
25571+
found = true;
25572+
}
2557225573
if (result && !/^data:/i.test(result.src)) {
2557325574
if (matchedRule.rules.length > 0 && target.nodeName.toUpperCase() != 'IMG') {
2557425575
let src = result.src, img = {src: src}, type, imgSrc = src;

0 commit comments

Comments
 (0)