2727
2828function getTheme ( ) {
2929 function changeTheme ( themeUrl ) {
30- var elm = document . getElementById ( "style" ) ;
30+ const elm = document . getElementById ( "style" ) ;
3131 elm && elm . remove ( ) ;
3232
33- var newCss = document . createElement ( "link" ) ;
33+ const newCss = document . createElement ( "link" ) ;
3434 newCss . id = "style" ;
3535 newCss . rel = "stylesheet" ;
3636 newCss . type = "text/css" ;
3737 newCss . href = themeUrl ;
3838 document . head . appendChild ( newCss ) ;
3939 }
40- var index = document . getElementById ( "select" ) . selectedIndex ;
40+ const index = document . getElementById ( "select" ) . selectedIndex ;
4141 switch ( index ) {
4242 case 0 :
4343 changeTheme ( 'css/light-snake.css?' + Math . random ( ) ) ;
7070}
7171
7272if ( navigator . onLine && window . location . hostname === 'patorjk.com' ) {
73- var _gaq = _gaq || [ ] ;
73+ const _gaq = _gaq || [ ] ;
7474 _gaq . push ( [ '_setAccount' , 'UA-3312460-1' ] ) ;
7575 _gaq . push ( [ '_trackPageview' ] ) ;
7676
7777 ( function ( ) {
78- var ga = document . createElement ( 'script' ) ; ga . type = 'text/javascript' ; ga . async = true ;
78+ const ga = document . createElement ( 'script' ) ; ga . type = 'text/javascript' ; ga . async = true ;
7979 ga . src = ( 'https:' == document . location . protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js' ;
80- var s = document . getElementsByTagName ( 'script' ) [ 0 ] ; s . parentNode . insertBefore ( ga , s ) ;
80+ const s = document . getElementsByTagName ( 'script' ) [ 0 ] ; s . parentNode . insertBefore ( ga , s ) ;
8181 } ) ( ) ;
8282}
8383</ script >
@@ -126,7 +126,7 @@ <h2>Select which mode you would like to play in.</h2>
126126 < script type ="text/javascript " src ="./js/init.js "> </ script >
127127 < script type ="text/javascript ">
128128 function go_full_screen ( ) {
129- var elem = document . documentElement ;
129+ const elem = document . documentElement ;
130130 try {
131131 if ( elem . requestFullscreen ) {
132132 elem . requestFullscreen ( ) ;
@@ -144,4 +144,4 @@ <h2>Select which mode you would like to play in.</h2>
144144 }
145145 </ script >
146146</ body >
147- </ html >
147+ </ html >
0 commit comments