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

发表回复

登录以发表回复。