Skip to content

Commit b967d47

Browse files
committed
fix
1 parent 9f49730 commit b967d47

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

JiandanHero/JiandanHero.user.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:en Jiandan Hero
44
// @name:zh-TW 煎蛋俠
55
// @namespace hoothin
6-
// @version 0.8
6+
// @version 1.0
77
// @description 为煎蛋jandan.net提供左右方向键快捷翻页、鼠标悬停显示大图、屏蔽指定用户发言等功能
88
// @description:en Tools for jandan.net
99
// @description:zh-TW 為煎蛋jandan.net提供左右方向鍵快捷翻頁、鼠標懸停顯示大圖、屏蔽指定用戶發言等功能
@@ -102,8 +102,10 @@
102102
if(!type && bigImg.width>document.documentElement.clientWidth){
103103
bigImg.width=document.documentElement.clientWidth;
104104
}
105-
if(top+bigImg.height>document.documentElement.clientHeight){
106-
top=document.documentElement.clientHeight-bigImg.height;
105+
if(top-bigImg.height<0){
106+
top=0;
107+
}else{
108+
top-=bigImg.height;
107109
}
108110
if(left+bigImg.width>document.documentElement.clientWidth){
109111
left=document.documentElement.clientWidth-bigImg.width;

0 commit comments

Comments
 (0)