File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 9
9
// @description :en Tools for jandan.net
10
10
// @description :zh-TW 為煎蛋jandan.net提供左右方向鍵快捷翻頁、上下方向鍵快捷切圖、鼠標懸停顯示大圖、屏蔽指定用戶發言等功能
11
11
// @author hoothin
12
- // @include http*://jandan.net/*
13
- // @include http*://i.jandan.net/*
12
+ // @match http*://jandan.net/*
13
+ // @match http*://i.jandan.net/*
14
14
// @grant GM_setValue
15
15
// @grant GM_getValue
16
16
// @grant GM_deleteValue
403
403
} else {
404
404
top -= imgHeight ;
405
405
}
406
- if ( left + imgWidth > document . documentElement . clientWidth ) {
407
- left = document . documentElement . clientWidth - imgWidth ;
406
+ if ( left > document . documentElement . clientWidth / 2 ) {
407
+ if ( left + imgWidth > document . documentElement . clientWidth ) {
408
+ left = document . documentElement . clientWidth - imgWidth ;
409
+ }
410
+ left += 10 ;
411
+ } else {
412
+ left = left - imgWidth ;
413
+ if ( left < 0 ) {
414
+ left = 0 ;
415
+ } else left -= 10 ;
408
416
}
409
- bigImg . style . left = left + 10 + "px" ;
417
+ bigImg . style . left = left + "px" ;
410
418
bigImg . style . top = top + "px" ;
411
419
}
412
420
GM_addStyle ( `
You can’t perform that action at this time.
0 commit comments