@@ -6,8 +6,8 @@ export default function otherFeatures() {
6
6
elemenetGetId ( 'loadingAn' ) . className = 'otherFeatures' ;
7
7
elemenetGetId ( 'loadingAn' ) . innerText = '显示' ;
8
8
elemenetGetId ( 'loadingTimeBtn' ) . style . display = '' ;
9
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . borderRadius = '10px 10px 0px 0px' ;
10
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . borderBottom = '1px solid #00000020' ;
9
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . borderRadius = '10px 10px 0px 0px' ;
10
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . borderBottom = '1px solid #00000020' ;
11
11
chrome . storage . sync . get ( [ 'dlMode' ] , function ( budget ) {
12
12
let dlMode = budget . dlMode ;
13
13
if ( typeof ( dlMode ) == 'undefined' ) {
@@ -20,33 +20,33 @@ export default function otherFeatures() {
20
20
elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#ffffff90' ;
21
21
}
22
22
} else if ( dlMode == 'dark' ) {
23
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#44444490' ;
23
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . backgroundColor = '#44444490' ;
24
24
} else if ( dlMode == 'light' ) {
25
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#ffffff90' ;
25
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . backgroundColor = '#ffffff90' ;
26
26
}
27
27
} )
28
28
chrome . storage . local . set ( { 'loadingAn' : 'show' } ) ;
29
29
} else {
30
30
elemenetGetId ( 'loadingAn' ) . className = 'otherFeaturesBefore' ;
31
31
elemenetGetId ( 'loadingAn' ) . innerText = '隐藏' ;
32
32
elemenetGetId ( 'loadingTimeBtn' ) . style . display = 'none' ;
33
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . borderRadius = '10px' ;
34
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . borderBottom = '0px' ;
33
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . borderRadius = '10px' ;
34
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . borderBottom = '0px' ;
35
35
chrome . storage . sync . get ( [ 'dlMode' ] , function ( budget ) {
36
36
let dlMode = budget . dlMode ;
37
37
if ( typeof ( dlMode ) == 'undefined' ) {
38
38
dlMode = '' ;
39
39
}
40
40
if ( dlMode == '' ) {
41
41
if ( window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ) {
42
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#44444450' ;
42
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . backgroundColor = '#44444450' ;
43
43
} else {
44
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#ffffff50' ;
44
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . backgroundColor = '#ffffff50' ;
45
45
}
46
46
} else if ( dlMode == 'dark' ) {
47
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#44444450' ;
47
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . backgroundColor = '#44444450' ;
48
48
} else if ( dlMode == 'light' ) {
49
- elemenetGetClass ( 'otherBtn' ) [ 0 ] . style . backgroundColor = '#ffffff50' ;
49
+ elemenetGetClass ( 'otherBtn' ) [ 1 ] . style . backgroundColor = '#ffffff50' ;
50
50
}
51
51
} )
52
52
0 commit comments