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.17 .2
9+ // @version 2017.3.20 .2
1010// @created 2011-6-15
1111// @namespace http://userscripts.org/users/NLF
1212// @homepage http://hoothin.com
20062006 scaleSmall : {
20072007 shown : true ,
20082008 count : 0 ,
2009- description : '缩放的图片,实际尺寸的高或宽都小于 ' + prefs . gallery . scaleSmallSize + ' 像素' ,
2009+ description : '小尺寸图片,实际尺寸的高和宽都小于 ' + prefs . gallery . scaleSmallSize + ' 像素' ,
20102010 name : '小尺寸'
20112011 } ,
20122012 } ;
@@ -7108,7 +7108,7 @@ background-image:url("'+ prefs.icons.magnifier +'");\
71087108 } , prefs . floatBar . showDelay ) ;
71097109 } ,
71107110 setButton :function ( ) {
7111- if ( this . data . type == 'force' ) {
7111+ if ( this . data . isForce ) {
71127112 this . buttons [ 'actual' ] . style . display = 'none' ;
71137113 this . buttons [ 'magnifier' ] . style . display = 'none' ;
71147114 } else {
@@ -7571,6 +7571,7 @@ background-image:url("'+ prefs.icons.magnifier +'");\
75717571 var src , // 大图地址
75727572 srcs , // 备用的大图地址
75737573 type , // 类别
7574+ isForce = false , //没有原图
75747575 imgSrc = img . src , // img 节点的 src
75757576 xhr ,
75767577 description ; // 图片的注释
@@ -7678,6 +7679,10 @@ background-image:url("'+ prefs.icons.magnifier +'");\
76787679 if ( prefs . floatBar . forceShow . enabled && ( imgCS . w >= prefs . floatBar . forceShow . size . w && imgCS . h >= prefs . floatBar . forceShow . size . h ) ) {
76797680 src = imgSrc ;
76807681 type = 'force' ;
7682+ isForce = true ;
7683+ if ( imgAS . h < prefs . gallery . scaleSmallSize && imgAS . w < prefs . gallery . scaleSmallSize ) {
7684+ type = 'scaleSmall' ;
7685+ }
76817686 } ;
76827687 } ;
76837688 } ;
@@ -7691,6 +7696,7 @@ background-image:url("'+ prefs.icons.magnifier +'");\
76917696 imgSrc : imgSrc , // 处理的图片的src
76927697 iPASrc : iPASrc , // 图片的第一个父a元素的链接地址
76937698
7699+ isForce :isForce ,
76947700 xhr : xhr ,
76957701 description : description || '' ,
76967702
@@ -8202,11 +8208,16 @@ background-image:url("'+ prefs.icons.magnifier +'");\
82028208 "default" : prefs . gallery . loadAll ,
82038209 title : '若页数过多可能影响体验'
82048210 } ,
8211+ 'gallery.scaleSmallSize' : {
8212+ label : '实际尺寸的高和宽都小于 ' ,
8213+ type : 'int' ,
8214+ "default" : prefs . gallery . scaleSmallSize ,
8215+ after : ' 像素则归入小尺寸图片'
8216+ } ,
82058217 'gallery.transition' : {
82068218 label : '显示图库切换图片的特效' ,
82078219 type : 'checkbox' ,
8208- "default" : prefs . gallery . transition ,
8209- title : ''
8220+ "default" : prefs . gallery . transition
82108221 } ,
82118222 'gallery.sidebarPosition' : {
82128223 label : '缩略图栏位置' ,
0 commit comments