Skip to content

Commit 1d248c3

Browse files
committed
frame error
1 parent 4bb76c1 commit 1d248c3

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// @description Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures or find the HD original picture automatically
77
// @description:zh-CN NLF 的围观图修改版,增加高清原图查找显示(在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存、查找原图)
88
// @description:zh-TW NLF 的圍觀圖修改版,增加高清原圖查詢顯示(線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存、查詢原圖)
9-
// @version 2017.4.18.1
9+
// @version 2017.4.19.1
1010
// @created 2011-6-15
1111
// @namespace http://userscripts.org/users/NLF
1212
// @homepage http://hoothin.com
@@ -3687,9 +3687,13 @@ display:none !important;\
36873687
imgs = Array.prototype.slice.call(imgs);
36883688
arrayFn.forEach.call(document.querySelectorAll("iframe"),function(iframe){
36893689
if(iframe.src.replace(/\/[^\/]*$/,"").indexOf(location.hostname)!=-1)
3690-
arrayFn.forEach.call(iframe.contentWindow.document.getElementsByTagName('img'),function(img){
3691-
imgs.push(img);
3692-
});
3690+
try{
3691+
arrayFn.forEach.call(iframe.contentWindow.document.getElementsByTagName('img'),function(img){
3692+
imgs.push(img);
3693+
});
3694+
}catch(e){
3695+
console.log(e.toString());
3696+
}
36933697
});
36943698
// 排除库里面的图片
36953699
imgs = imgs.filter(function(img){
@@ -6974,7 +6978,11 @@ background-color:rgba(255, 0, 0, 0.150);\
69746978
imgsHandle(doc.getElementsByTagName('img'));
69756979
arrayFn.forEach.call(doc.querySelectorAll("iframe"),function(iframe){
69766980
if(iframe.src.replace(/\/[^\/]*$/,"").indexOf(location.hostname)!=-1)
6977-
imgsHandle(iframe.contentWindow.document.getElementsByTagName('img'));
6981+
try{
6982+
imgsHandle(iframe.contentWindow.document.getElementsByTagName('img'));
6983+
}catch(e){
6984+
console.log(e.toString());
6985+
}
69786986
});
69796987
return validImgs;
69806988
},

0 commit comments

Comments
 (0)