11var localStorage = require ( 'localStorage' )
2- var JsonStorage = require ( 'json-storage' ) . JsonStorage
3- var store = JsonStorage . create ( localStorage , 'temps' , { stringify : true } )
2+ let JsonStorage = require ( 'json-storage' ) . JsonStorage
3+ let store = JsonStorage . create ( localStorage , 'temps' , { stringify : true } )
44
5- var $ , jQuery = require ( 'jquery' )
6- var chart = require ( 'chart.js' )
7- var ipcRenderer = require ( 'electron' ) . ipcRenderer
8- var CountUp = require ( 'countup.js' )
5+ const jQuery = require ( 'jquery' )
6+ const chart = require ( 'chart.js' )
7+ const ipcRenderer = require ( 'electron' ) . ipcRenderer
8+ const CountUp = require ( 'countup.js' )
99
1010const config = require ( './src/config.json' )
1111
12- var wdata = { }
12+ let wdata = { }
1313
14- var color = null
15- var loading = [ false , false , false , false ]
16- var timeoffset = config . timezone . offset
17- var numAnim = null
14+ let color = null
15+ let loading = [ false , false , false , false ]
16+ let timeoffset = config . timezone . offset
17+ let numAnim = null
1818
1919window . onload = function ( )
2020{
@@ -25,7 +25,7 @@ window.onload = function ()
2525 loadEventListener ( )
2626}
2727
28- var loadEventListener = function ( ) {
28+ const loadEventListener = function ( ) {
2929
3030 jQuery ( '#details .content' ) . click ( toggleDetails )
3131
@@ -56,7 +56,7 @@ var loadEventListener = function () {
5656 } )
5757
5858 jQuery ( 'input[type="checkbox"][name="favorite-city"]' ) . change ( function ( ) {
59- var bool = jQuery ( 'input[type="checkbox"][name="favorite-city"]:checked' ) . length > 0
59+ const bool = jQuery ( 'input[type="checkbox"][name="favorite-city"]:checked' ) . length > 0
6060 if ( bool ) {
6161 setFavoriteCity ( jQuery ( 'input#city' ) . val ( ) )
6262 } else {
@@ -65,7 +65,7 @@ var loadEventListener = function () {
6565 } )
6666
6767 jQuery ( 'input[type="checkbox"][name="mb-info"]' ) . change ( function ( ) {
68- var bool = jQuery ( 'input[type="checkbox"][name="mb-info"]:checked' ) . length > 0
68+ const bool = jQuery ( 'input[type="checkbox"][name="mb-info"]:checked' ) . length > 0
6969 setMbInfo ( bool )
7070 if ( getMbInfo ( ) ) {
7171 refreshWeather ( )
@@ -75,7 +75,7 @@ var loadEventListener = function () {
7575 } )
7676
7777 jQuery ( 'input[type="checkbox"][name="auto-launch"]' ) . change ( function ( ) {
78- var bool = jQuery ( 'input[type="checkbox"][name="auto-launch"]:checked' ) . length > 0
78+ const bool = jQuery ( 'input[type="checkbox"][name="auto-launch"]:checked' ) . length > 0
7979 setAutoLaunch ( bool )
8080 ipcRenderer . send ( 'auto-launch' )
8181 } )
@@ -124,7 +124,7 @@ var loadEventListener = function () {
124124 ipcRenderer . on ( 'random-city' , randomCity )
125125}
126126
127- var init = function ( ) {
127+ const init = function ( ) {
128128 if ( store . get ( 'actual-city' ) ) {
129129 setCity ( store . get ( 'actual-city' ) )
130130 } else {
0 commit comments