Skip to content

Commit 725e46d

Browse files
committed
Use strict js mode
1 parent 59604a4 commit 725e46d

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

data/index.css

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ body .navbar {
6060
}
6161
.btn {
6262
border-width: 0px;
63-
outline:0px;
63+
outline:0px;
6464
}
6565
#settingsOffcanvas {
6666
background-color: #141414;
@@ -160,35 +160,35 @@ body .form-range::-moz-range-progress {
160160
padding: 10px 0px;
161161
}
162162
.spinner .btn-spinner {
163-
padding: 0px 5px;
164-
font-size: 19px;
163+
padding: 0px 5px;
164+
font-size: 19px;
165165
font-weight: bold;
166-
cursor: pointer;
167-
user-select: none;
166+
cursor: pointer;
167+
user-select: none;
168168
vertical-align: middle;
169169
}
170170
.spinner .btn-spinner:hover {
171-
color: white;
171+
color: white;
172172
}
173173
.spinner .spinner-input {
174-
-moz-appearance: textfield;
175-
-webkit-appearance: none;
176-
width: 100px;
177-
height: 32px;
178-
border: 1px solid #6E6F7A;
179-
border-radius: 5px;
180-
color: #000;
181-
text-align: center;
182-
padding: 0.375rem 0.75rem;
174+
-moz-appearance: textfield;
175+
-webkit-appearance: none;
176+
width: 100px;
177+
height: 32px;
178+
border: 1px solid #6E6F7A;
179+
border-radius: 5px;
180+
color: #000;
181+
text-align: center;
182+
padding: 0.375rem 0.75rem;
183183
line-height: 1.5;
184184
}
185185
.spinner input::-webkit-outer-spin-button,
186186
.spinner input::-webkit-inner-spin-button {
187-
-webkit-appearance: none;
188-
margin: 0;
187+
-webkit-appearance: none;
188+
margin: 0;
189189
}
190190
.spinner input[type=number]{
191-
-moz-appearance: textfield;
191+
-moz-appearance: textfield;
192192
}
193193
.form-spinner-label {
194194
flex: 1;

data/index.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
let connection;
24
let queue;
35
let 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

165167
function 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

Comments
 (0)