@@ -99,7 +99,21 @@ export function fesUse() {
99
99
elemenetGetId ( 'clock' ) . hidden = false ; //show calculator button
100
100
} else {
101
101
elemenetGetId ( 'mainClock' ) . style . display = "none" ; //hide clock element
102
- onShow ( ) ;
102
+ chrome . storage . local . get ( [ 'hideHS' , 'historyHS' , 'reloadHS' , 'calHS' , 'timeHS' , 'weatherHS' , 'downHS' , 'infoHS' , 'oneHS' , 'hs' ] , function ( budget ) {
103
+ let hideHS = budget . hideHS ;
104
+ let historyHS = budget . historyHS ;
105
+ let reloadHS = budget . reloadHS ;
106
+ let calHS = budget . calHS ;
107
+ let timeHS = budget . timeHS ;
108
+ let weatherHS = budget . weatherHS ;
109
+ let downHS = budget . downHS ;
110
+ let infoHS = budget . infoHS ;
111
+ let oneHS = budget . oneHS ;
112
+ var hide = elemenetGetId ( 'hide' ) ;
113
+ var info = elemenetGetId ( 'info' ) ;
114
+ let hs = budget . hs ;
115
+ loadHs ( hideHS , historyHS , reloadHS , calHS , timeHS , weatherHS , downHS , infoHS , oneHS , hs , hide , info )
116
+ } )
103
117
}
104
118
}
105
119
}
@@ -216,9 +230,10 @@ export function changeStyle() {
216
230
cal . style . marginRight = '0' ; //set calculator button margin right to 0px
217
231
clock . hidden = true ; //hide clock button
218
232
history . hidden = true ; //hide history button
219
- button . style . marginBottom = '20vh' ; //chenge ui button
233
+ button . addEventListener ( 'DOMNodeInserted' , ( ) => {
234
+ button . style . marginBottom = '20vh' ; //chenge ui button
235
+ } )
220
236
button . style . maxWidth = '280px' ;
221
- button . style . transition = 'margin 0.5s' ;
222
237
button . style . zIndex = '100' ;
223
238
oneMain . style . width = '0px' ;
224
239
oneMain . style . height = '0px' ;
@@ -300,7 +315,6 @@ export function changeStyle() {
300
315
window . onresize = ( ) => {
301
316
var nowHeight = document . documentElement . clientHeight ;
302
317
if ( screenHeight - nowHeight > 50 ) {
303
- elemenetGetId ( 'button' ) . style . transition = '0s' ;
304
318
elemenetGetId ( 'button' ) . style . marginBottom = '-60px' ;
305
319
elemenetGetId ( 'title' ) . style . marginBottom = '-60px' ;
306
320
} else {
@@ -310,7 +324,9 @@ export function changeStyle() {
310
324
}
311
325
} else {
312
326
//in desktop mode to change some style
313
- button . style . marginBottom = '20px'
327
+ button . addEventListener ( 'DOMNodeInserted' , ( ) => {
328
+ button . style . marginBottom = '20px'
329
+ } )
314
330
oneMain . className = 'oneMainBefore' ;
315
331
}
316
332
}
0 commit comments