你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/24204-picviewer-ce/discussions/65162,源站連結 點此以跳轉

Picviewer CE+

在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存

< 脚本 Picviewer CE+ 的反馈

提问 / 留言

§
发布于:2020-10-21

please replace string:
var result,hasBg=function(node){var nodeStyle=getComputedStyle(node);return node&&nodeStyle.backgroundImage&&/^url/.test(nodeStyle.backgroundImage)&&nodeStyle.backgroundImage.indexOf("about:blank")==-1&&nodeStyle.width.replace("px","")>prefs.floatBar.minSizeLimit.w&&nodeStyle.height.replace("px","")>prefs.floatBar.minSizeLimit.h;}; to sting:
var result,hasBg=function(node){if (node.constructor && node.constructor.name === 'HTMLElement'){ var nodeStyle=getComputedStyle(node);return node&&nodeStyle.backgroundImage&&/^url/.test(nodeStyle.backgroundImage)&&nodeStyle.backgroundImage.indexOf("about:blank")==-1&&nodeStyle.width.replace("px","")>prefs.floatBar.minSizeLimit.w&&nodeStyle.height.replace("px","")>prefs.floatBar.minSizeLimit.h;};}

because in old variant it sometime log to console:
Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element or something like this

发布留言

登录以发布留言。