@@ -7113,7 +7113,7 @@ background-image:url("'+ prefs.icons.magnifier +'");\
71137113 } , prefs . floatBar . showDelay ) ;
71147114 } ,
71157115 setButton :function ( ) {
7116- if ( this . data . isForce ) {
7116+ if ( this . data . noActual ) {
71177117 this . buttons [ 'actual' ] . style . display = 'none' ;
71187118 this . buttons [ 'magnifier' ] . style . display = 'none' ;
71197119 } else {
@@ -7576,7 +7576,7 @@ background-image:url("'+ prefs.icons.magnifier +'");\
75767576 var src , // 大图地址
75777577 srcs , // 备用的大图地址
75787578 type , // 类别
7579- isForce = false , //没有原图
7579+ noActual = false , //没有原图
75807580 imgSrc = img . src , // img 节点的 src
75817581 xhr ,
75827582 description ; // 图片的注释
@@ -7645,13 +7645,14 @@ background-image:url("'+ prefs.icons.magnifier +'");\
76457645 } ;
76467646
76477647 if ( ! src && imgPA ) { //链接可能是一张图片...
7648- if ( / \. (?: j p g | j p e g | p n g | g i f | b m p ) $ / i. test ( iPASrc ) ) {
7648+ if ( / \. (?: j p g | j p e g | p n g | g i f | b m p ) $ / i. test ( iPASrc ) && iPASrc != img . src ) {
76497649 src = iPASrc ;
76507650 } ;
76517651 if ( src ) type = 'scale' ;
76527652 } ;
76537653
76547654 if ( ! src ) { //本图片是否被缩放.
7655+ noActual = true ;
76557656 var imgAS = { //实际尺寸。
76567657 h :img . naturalHeight ,
76577658 w :img . naturalWidth ,
@@ -7667,27 +7668,21 @@ background-image:url("'+ prefs.icons.magnifier +'");\
76677668 // if (!isNaN(imgCS.h)) imgCS.h = Math.round(imgCS.h);
76687669 // if (!isNaN(imgCS.w)) imgCS.w = Math.round(imgCS.w);
76697670
7670- if ( ! ( imgAS . w == imgCS . w && imgAS . h == imgCS . h ) ) { //如果不是两者完全相等,那么被缩放了.
7671+ if ( imgAS . h < prefs . gallery . scaleSmallSize && imgAS . w < prefs . gallery . scaleSmallSize ) {
7672+ type = 'scaleSmall' ;
7673+ } else if ( ! ( imgAS . w == imgCS . w && imgAS . h == imgCS . h ) ) { //如果不是两者完全相等,那么被缩放了.
76717674 if ( imgAS . h > prefs . floatBar . minSizeLimit . h || imgAS . w > prefs . floatBar . minSizeLimit . w ) { //最小限定判断.
76727675 src = imgSrc ;
76737676 type = 'scale' ;
7674-
76757677 // // 图片尺寸相差
76767678 // if (!isNaN(imgCS.h) && (imgAS.h * imgAS.w / (imgCS.h * imgCS.w) * 100 - 100) < prefs.gallery.zoomresized) {
76777679 // type = 'scaleZoomResized'
76787680 // }
7679- if ( imgAS . h < prefs . gallery . scaleSmallSize && imgAS . w < prefs . gallery . scaleSmallSize ) {
7680- type = 'scaleSmall' ;
7681- }
76827681 } ;
76837682 } else {
76847683 if ( prefs . floatBar . forceShow . enabled && ( imgCS . w >= prefs . floatBar . forceShow . size . w && imgCS . h >= prefs . floatBar . forceShow . size . h ) ) {
76857684 src = imgSrc ;
76867685 type = 'force' ;
7687- isForce = true ;
7688- if ( imgAS . h < prefs . gallery . scaleSmallSize && imgAS . w < prefs . gallery . scaleSmallSize ) {
7689- type = 'scaleSmall' ;
7690- }
76917686 } ;
76927687 } ;
76937688 } ;
@@ -7701,7 +7696,7 @@ background-image:url("'+ prefs.icons.magnifier +'");\
77017696 imgSrc : imgSrc , // 处理的图片的src
77027697 iPASrc : iPASrc , // 图片的第一个父a元素的链接地址
77037698
7704- isForce : isForce ,
7699+ noActual : noActual ,
77057700 xhr : xhr ,
77067701 description : description || '' ,
77077702
0 commit comments