Commit 67bd220 1 parent 5480377 commit 67bd220 Copy full SHA for 67bd220
File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 35
35
36
36
< input id ="save " type ="button " value ="收藏 " style ="margin-left:10px "/>
37
37
< input id ="remove " type ="button " value ="删除 "/>
38
- < input id ="last " type ="button " value ="最后 "/>
38
+ < input id ="first " type ="button " value =" 首 "/>
39
+ < input id ="last " type ="button " value =" 尾 "/>
39
40
40
41
< input id ="prev " type ="button " value ="上一张 " style ="margin-left:10px "/>
41
42
< input id ="next " type ="button " value ="下一张 "/>
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ const loading = document.getElementById("loading"); // loading效果
9
9
const auto = document . getElementById ( "auto" ) ; // 自动
10
10
const save = document . getElementById ( "save" ) ; // 收藏
11
11
const remove = document . getElementById ( "remove" ) ; // 删除
12
- const last = document . getElementById ( "last" ) ; // 最后:加载最后一张收藏
12
+ const first = document . getElementById ( "first" ) ; // 首:加载第一张收藏
13
+ const last = document . getElementById ( "last" ) ; // 尾:加载最后一张收藏
13
14
const prev = document . getElementById ( "prev" ) ; // 上一张
14
15
const next = document . getElementById ( "next" ) ; // 下一张
15
16
@@ -100,7 +101,17 @@ let inFocus = false; // 输入框是否获取到了焦点
100
101
localStorage . setItem ( "savePidList" , JSON . stringify ( savePidList ) ) ;
101
102
}
102
103
} ) ;
103
- // “最后” 按钮点击事件
104
+ // “首” 按钮点击事件
105
+ first . addEventListener ( "click" , function ( ) {
106
+ const savePidList = getSavePidList ( ) ;
107
+ if ( savePidList . length > 0 ) {
108
+ const lastSavePid = savePidList [ 0 ] ;
109
+ input . value = lastSavePid ;
110
+ input . style . backgroundColor = '#f1e0b8' ;
111
+ doEnter ( lastSavePid , false ) ;
112
+ }
113
+ } ) ;
114
+ // “尾” 按钮点击事件
104
115
last . addEventListener ( "click" , function ( ) {
105
116
const savePidList = getSavePidList ( ) ;
106
117
if ( savePidList . length > 0 ) {
You can’t perform that action at this time.
0 commit comments