Skip to content

Commit 2a5cdd9

Browse files
committed
add lofter
1 parent dff0198 commit 2a5cdd9

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 12 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.8.21.2
9+
// @version 2017.9.6.1
1010
// @created 2011-6-15
1111
// @namespace http://userscripts.org/users/NLF
1212
// @homepage http://hoothin.com
@@ -508,7 +508,7 @@
508508
{name: '知乎',
509509
url: /zhihu\.com/,
510510
getImage: function() {
511-
return this.src.replace(/_(b|s|\d+x\d+)\./,".");
511+
return this.src.replace(/_(b|s|l|\d+x\d+)\./,".");
512512
}
513513
},
514514
{name: 'Nyaa',
@@ -606,13 +606,22 @@
606606
url: /pixiv\.net|pximg\.net/,
607607
getImage: function() {
608608
return this.src.replace(/pximg\.net\/c\/\d+x\d+\/img-master\/img\/(.*)_[^_]+(\.[a-z]+)$/i,"pximg.net/img-original/img/$1$2");
609-
}
609+
}
610610
},
611611
{name: "Wallhaven",
612612
url: /wallhaven\./,
613613
getImage: function() {
614614
return this.src.replace(/wallpapers\/thumb\/small\/th/i,"wallpapers/full/wallhaven");
615615
}
616+
},
617+
{name: "lofter",
618+
url: /lofter\./,
619+
getImage: function(img, a) {
620+
if(a && a.href && a.hasAttribute("bigimgsrc")){
621+
return a.getAttribute("bigimgsrc");
622+
}
623+
return this.src.replace(/\?.*/i,"");
624+
}
616625
}
617626
];
618627

0 commit comments

Comments
 (0)