|
6 | 6 | // @description Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures or find the HD original picture automatically |
7 | 7 | // @description:zh-CN NLF 的围观图修改版,增加高清原图查找显示(在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存、查找原图) |
8 | 8 | // @description:zh-TW NLF 的圍觀圖修改版,增加高清原圖查詢顯示(線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存、查詢原圖) |
9 | | -// @version 2017.4.18.1 |
| 9 | +// @version 2017.4.19.1 |
10 | 10 | // @created 2011-6-15 |
11 | 11 | // @namespace http://userscripts.org/users/NLF |
12 | 12 | // @homepage http://hoothin.com |
@@ -3687,9 +3687,13 @@ display:none !important;\ |
3687 | 3687 | imgs = Array.prototype.slice.call(imgs); |
3688 | 3688 | arrayFn.forEach.call(document.querySelectorAll("iframe"),function(iframe){ |
3689 | 3689 | 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 | + } |
3693 | 3697 | }); |
3694 | 3698 | // 排除库里面的图片 |
3695 | 3699 | imgs = imgs.filter(function(img){ |
@@ -6974,7 +6978,11 @@ background-color:rgba(255, 0, 0, 0.150);\ |
6974 | 6978 | imgsHandle(doc.getElementsByTagName('img')); |
6975 | 6979 | arrayFn.forEach.call(doc.querySelectorAll("iframe"),function(iframe){ |
6976 | 6980 | 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 | + } |
6978 | 6986 | }); |
6979 | 6987 | return validImgs; |
6980 | 6988 | }, |
|
0 commit comments