11const settings = ( ( _ ) => {
22 let save_settings = function ( ) {
3- localStorage . setItem ( "owm-key" , document . getElementById ( "owm-key" ) . value ) ;
4-
5- localStorage . setItem ( "past-radar" , document . getElementById ( "past-radar" ) . value )
3+ localStorage . setItem (
4+ "past-radar" ,
5+ document . getElementById ( "past-radar" ) . value
6+ ) ;
67
7- localStorage . setItem ( "forecast-radar" , document . getElementById ( "forecast-radar" ) . value )
8+ localStorage . setItem (
9+ "forecast-radar" ,
10+ document . getElementById ( "forecast-radar" ) . value
11+ ) ;
812
9- localStorage . setItem ( "radar-time" , document . getElementById ( "radar-time" ) . value )
13+ localStorage . setItem (
14+ "radar-time" ,
15+ document . getElementById ( "radar-time" ) . value
16+ ) ;
1017
1118 localStorage . setItem (
1219 "routing_profil" ,
@@ -181,10 +188,10 @@ const settings = ((_) => {
181188
182189 //set values in setting page
183190
184- document . getElementById ( "owm-key" ) . value = setting . openweather_api ;
185191 document . getElementById ( "past-radar" ) . value = setting . past_radar_count ;
186- document . getElementById ( "forecast-radar" ) . value = setting . forecast_radar_count ;
187- document . getElementById ( "radar-time" ) . value = setting . radar_time
192+ document . getElementById ( "forecast-radar" ) . value =
193+ setting . forecast_radar_count ;
194+ document . getElementById ( "radar-time" ) . value = setting . radar_time ;
188195
189196 document . getElementById ( "ors-key" ) . value = setting . ors_api ;
190197 document . getElementById ( "routing-profil" ) . value = setting . routing_profil ;
@@ -253,9 +260,12 @@ const settings = ((_) => {
253260
254261 setTimeout ( ( ) => {
255262 document . getElementById ( "owm-key" ) . value = setting . openweather_api ;
256- document . getElementById ( "past-radar" ) . value = setting . past_radar_count || "5" ;
257- document . getElementById ( "forecast-radar" ) . value = setting . forecast_radar_count || "3" ;
258- document . getElementById ( "radar-time" ) . value = setting . radar_time || "2000" ;
263+ document . getElementById ( "past-radar" ) . value =
264+ setting . past_radar_count || "5" ;
265+ document . getElementById ( "forecast-radar" ) . value =
266+ setting . forecast_radar_count || "3" ;
267+ document . getElementById ( "radar-time" ) . value =
268+ setting . radar_time || "2000" ;
259269
260270 document . getElementById ( "ors-key" ) . value = setting . ors_api ;
261271 document . getElementById ( "routing-profil" ) . value =
@@ -306,11 +316,14 @@ const settings = ((_) => {
306316 document . getElementById ( "owm-key" ) . value =
307317 setting . openweather_api ;
308318
309- document . getElementById ( "past-radar" ) . value = setting . past_radar_count ;
319+ document . getElementById ( "past-radar" ) . value =
320+ setting . past_radar_count ;
310321
311- document . getElementById ( "forecast-radar" ) . value = setting . forecast_radar_count ;
322+ document . getElementById ( "forecast-radar" ) . value =
323+ setting . forecast_radar_count ;
312324
313- document . getElementById ( "radar-time" ) . value = setting . radar_time
325+ document . getElementById ( "radar-time" ) . value =
326+ setting . radar_time ;
314327
315328 document . getElementById ( "ors-key" ) . value =
316329 setting . ors_api ;
@@ -417,4 +430,4 @@ const settings = ((_) => {
417430 export_settings,
418431 load_settings_from_file,
419432 } ;
420- } ) ( ) ;
433+ } ) ( ) ;
0 commit comments