Skip to content

Commit 1a8e762

Browse files
committed
add flBar hide option
1 parent 83062e8 commit 1a8e762

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 16 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 2018.5.30.1
9+
// @version 2018.6.11.1
1010
// @created 2011-6-15
1111
// @namespace http://userscripts.org/users/NLF
1212
// @homepage http://hoothin.com
@@ -138,6 +138,7 @@
138138
floatBar:"浮动工具栏",
139139
showDelay:"显示延时",
140140
ms:"毫秒",
141+
hide:"隐藏",
141142
hideDelay:"隐藏延时",
142143
forceShow:"非缩放图片,超过该尺寸,显示浮框",
143144
forceShowTip:"非缩放的图片大小超过下面设定的尺寸时显示浮动工具栏",
@@ -320,6 +321,7 @@
320321
floatBar:"浮動工具欄",
321322
showDelay:"顯示延時",
322323
ms:"毫秒",
324+
hide:"隱藏",
323325
hideDelay:"隱藏延時",
324326
forceShow:"非縮放圖片,超過該尺寸,顯示浮框",
325327
forceShowTip:"非縮放的圖片大小超過下面設定的尺寸時顯示浮動工具欄",
@@ -502,6 +504,7 @@
502504
floatBar:"floatBar",
503505
showDelay:"showDelay",
504506
ms:"ms",
507+
hide:"hide",
505508
hideDelay:"hideDelay",
506509
forceShow:"forceShow",
507510
forceShowTip:"forceShowTip",
@@ -7700,7 +7703,7 @@ left: -45px;\
77007703
};
77017704
searchFun();
77027705
}else{
7703-
this.loadImg(this.data.src, this.data.srcs);
7706+
this.loadImg(this.data.src||this.data.imgSrc, this.data.srcs);
77047707
}
77057708
} else {
77067709
xhrLoad.load({
@@ -8177,6 +8180,7 @@ left: -45px;\
81778180
var fbs=this.floatBar.style;
81788181
var setPosition={
81798182
top:function(){
8183+
fbs.opacity=1;
81808184
var top=targetPosi.top + scrolled.y;
81818185
if(targetPosi.top + offsetY < 0){//满足图标被遮住的条件.
81828186
top=scrolled.y;
@@ -8185,6 +8189,7 @@ left: -45px;\
81858189
fbs.top=top + offsetY + 'px';
81868190
},
81878191
right:function(){
8192+
fbs.opacity=1;
81888193
var right=windowSize.w - targetPosi.right;
81898194
if(right < offsetX){
81908195
right= -scrolled.x;
@@ -8195,6 +8200,7 @@ left: -45px;\
81958200
fbs.right=right - offsetX + 'px';
81968201
},
81978202
bottom:function(){
8203+
fbs.opacity=1;
81988204
var bottom=windowSize.h - targetPosi.bottom;
81998205
if(bottom <= offsetY){
82008206
bottom=-scrolled.y;
@@ -8205,6 +8211,7 @@ left: -45px;\
82058211
fbs.bottom=bottom - offsetY + 'px';
82068212
},
82078213
left:function(){
8214+
fbs.opacity=1;
82088215
var left=targetPosi.left + scrolled.x;
82098216
if(targetPosi.left + offsetX < 0){
82108217
left=scrolled.x;
@@ -8213,12 +8220,17 @@ left: -45px;\
82138220
fbs.left=left + offsetX + 'px';
82148221
},
82158222
center:function(){
8223+
fbs.opacity=1;
82168224
var left=targetPosi.left + scrolled.x + offsetX;
82178225
fbs.left=left + img.width/2 + 'px';
82188226
},
8227+
hide:function(){
8228+
fbs.opacity=0;
8229+
},
82198230
};
82208231

82218232
setPosition[floatBarPosi[0]]();
8233+
if(floatBarPosi.length>1)
82228234
setPosition[floatBarPosi[1]]();
82238235
},
82248236
show:function(){
@@ -9148,7 +9160,8 @@ left: -45px;\
91489160
'bottom right': i18n("bottomRight"),
91499161
'bottom left': i18n("bottomLeft"),
91509162
'top center': i18n("topCenter"),
9151-
'bottom center': i18n("bottomCenter")
9163+
'bottom center': i18n("bottomCenter"),
9164+
'hide': i18n("hide")
91529165
},
91539166
"default": prefs.floatBar.position,
91549167
section: [i18n("floatBar")],

0 commit comments

Comments
 (0)