1+ 'use strict' ;
2+
13let connection ;
24let queue ;
35let cooldownTimer ;
@@ -72,7 +74,7 @@ function registerColorPicker(colorPicker, idx) {
7274 const template = document . getElementById ( 'colorPickerTemplate' ) . innerHTML ;
7375 const colorPickerId = 'colorPicker' + idx ;
7476 const colorPickerButtonId = 'colorPickerButton' + idx ;
75- colorPickersWrapper = document . getElementById ( 'colorPickersWrapper' ) ;
77+ const colorPickersWrapper = document . getElementById ( 'colorPickersWrapper' ) ;
7678 colorPickersWrapper . insertAdjacentHTML ( 'beforeend' , eval ( '`' + template + '`' ) ) ;
7779 const cp = new iro . ColorPicker ( '#' + colorPickerId , {
7880 width : 250 ,
@@ -99,7 +101,7 @@ function registerAnimation(animation, idx) {
99101 startupAnimation . add ( new Option ( animation ) ) ;
100102
101103 const template = document . getElementById ( 'animationButtonTemplate' ) . innerHTML ;
102- animationButtons = document . getElementById ( 'animationButtons' ) ;
104+ const animationButtons = document . getElementById ( 'animationButtons' ) ;
103105 animationButtons . lastElementChild . insertAdjacentHTML ( 'beforebegin' , eval ( '`' + template + '`' ) ) ;
104106}
105107
@@ -163,10 +165,10 @@ function handleJsonData(data) {
163165}
164166
165167function updateAnimationButtons ( status , animation ) {
166- animationButtons = document . querySelectorAll ( '#animationButtons button' ) ;
168+ const animationButtons = document . querySelectorAll ( '#animationButtons button' ) ;
167169 animationButtons . forEach ( ( btn , idx ) => {
168- buttonIcon = btn . querySelector ( 'div i' )
169- buttonContent = btn . querySelector ( 'div span' ) . innerHTML
170+ let buttonIcon = btn . querySelector ( 'div i' )
171+ const buttonContent = btn . querySelector ( 'div span' ) . innerHTML
170172 if ( animation == buttonContent ) {
171173 if ( status == 2 ) {
172174 buttonIcon . classList = 'bi bi-play-fill'
0 commit comments