Skip to content

Commit 8a0fe65

Browse files
committed
fix
1 parent 3a4ac8e commit 8a0fe65

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 31 additions & 3 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.3.25.1
9+
// @version 2017.3.28.1
1010
// @created 2011-6-15
1111
// @namespace http://userscripts.org/users/NLF
1212
// @homepage http://hoothin.com
@@ -307,8 +307,13 @@
307307
url:/^https?:\/\/[^.]*\.deviantart\.com/i,
308308
getImage:function(img, a){
309309
var oldsrc=this.src;
310-
var newsrc = a.getAttribute('data-super-img') || a.getAttribute('data-super-full-img')
311-
|| oldsrc.replace(/(http:\/\/[^\/]+\/fs\d+\/)200H\/(.*)/i,'$1$2');
310+
var newsrc;
311+
if(this.className=="fakethumb" && this.parentNode && this.parentNode.parentNode && this.parentNode.parentNode.parentNode && this.parentNode.parentNode.parentNode.dataset){
312+
newsrc=this.parentNode.parentNode.parentNode.dataset.superFullImg;
313+
}
314+
if(!newsrc)
315+
newsrc = a.getAttribute('data-super-img') || a.getAttribute('data-super-full-img')
316+
|| oldsrc.replace(/(http:\/\/[^\/]+\/fs\d+\/)200H\/(.*)/i,'$1$2');
312317
return newsrc==oldsrc? '' : newsrc;
313318
},
314319
},
@@ -543,6 +548,12 @@
543548
getImage: function() {
544549
return this.src.replace(/\/thumb\//i,"/original/").replace(/\/thumbnails\//i,"/");
545550
}
551+
},
552+
{name: "dribbble",
553+
url: /dribbble\.com/,
554+
getImage: function() {
555+
return this.src.replace(/_teaser(.[^\.]+)$/i,"$1");
556+
}
546557
}
547558
];
548559

@@ -7969,6 +7980,23 @@ background-image:url("'+ prefs.icons.magnifier +'");\
79697980
// }
79707981
// }
79717982
// }
7983+
if (target.nodeName != 'IMG'){
7984+
var imgChild=target.querySelectorAll('img');
7985+
if(imgChild.length==1){
7986+
target=imgChild[0];
7987+
}else if(target.parentNode){
7988+
if(target.parentNode.nodeName=='IMG'){
7989+
target=target.parentNode;
7990+
}else{
7991+
if(unsafeWindow.getComputedStyle(target).position=="absolute"){
7992+
imgChild=target.parentNode.querySelectorAll('img');
7993+
if(imgChild.length==1){
7994+
target=imgChild[0];
7995+
}
7996+
}
7997+
}
7998+
}
7999+
}
79728000

79738001
if (!target || !result && target.nodeName != 'IMG') return;
79748002

0 commit comments

Comments
 (0)