Skip to content

Commit d58ea67

Browse files
authored
Merge pull request #11 from BrowserSourcesForOBS/dev
Update format
2 parents 7795732 + f17707d commit d58ea67

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

core/template/cdown/control/control.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ selectorLang.addEventListener('change', () => {
157157
})
158158

159159
controlButton.addEventListener('click', () => {
160-
if (controlButton.textContent === translateElements.timer.buttons.start || 'n/a') {
160+
if (controlButton.textContent === translateElements.timer.buttons.start) {
161161
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
162162
} else {
163163
socket.send(JSON.stringify({ action: 'pauseCdown', classElement }))
@@ -218,7 +218,7 @@ subContainer.addEventListener('click', (event) => {
218218
})
219219

220220
textMsg.addEventListener('focus', () => {
221-
if (textMsg.textContent === translateElements.timer.phMsgEnd || 'n/a') {
221+
if (textMsg.textContent === translateElements.timer.phMsgEnd) {
222222
textMsg.textContent = ''
223223
textMsg.style.color = '#000'
224224
}

core/template/cdowntime/control/control.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ socket.addEventListener('message', (event) => {
107107
// Perform necessary actions with the variables here
108108
textMsg.textContent = elementVariables.msgEnd
109109
if (elementVariables.msgEnd === '') {
110-
textMsg.textContent = translateElements.timer.phMsgEnd || 'n/a'
110+
textMsg.textContent = translateElements.timer.phMsgEnd || 'n/a'
111111
textMsg.style.color = '#555'
112112
} else { textMsg.style.color = '#000' }
113113
timeData.value = new Date(elementVariables.endDatetime).toLocaleString('en-CA', { timeZone: elementVariables.timezone, hour12: false }).replace(/,\s/, 'T')
@@ -189,7 +189,7 @@ subContainer.addEventListener('click', (event) => {
189189
})
190190

191191
textMsg.addEventListener('focus', () => {
192-
if (textMsg.textContent === translateElements.timer.phMsgEnd || 'n/a') {
192+
if (textMsg.textContent === translateElements.timer.phMsgEnd) {
193193
textMsg.textContent = ''
194194
textMsg.style.color = '#000'
195195
}

core/template/crono/control/control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ languageSelector.addEventListener('change', () => {
139139
})
140140

141141
controlButton.addEventListener('click', () => {
142-
if (controlButton.textContent === translateElements.timer.buttons.start || 'n/a') {
142+
if (controlButton.textContent === translateElements.timer.buttons.start) {
143143
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
144144
} else {
145145
socket.send(JSON.stringify({ action: 'pauseCrono', classElement }))

core/template/extensible/control/control.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ selectorLang.addEventListener('change', () => {
179179
})
180180

181181
controlButton.addEventListener('click', () => {
182-
if (controlButton.textContent === translateElements.timer.buttons.start || 'n/a') {
182+
if (controlButton.textContent === translateElements.timer.buttons.start) {
183183
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
184184
} else {
185185
socket.send(JSON.stringify({ action: 'pauseExtensible', classElement }))
@@ -248,7 +248,7 @@ checkboxPauseAdd.addEventListener('change', () => {
248248
})
249249

250250
textMsg.addEventListener('focus', () => {
251-
if (textMsg.textContent === translateElements.timer.phMsgEnd || 'n/a') {
251+
if (textMsg.textContent === translateElements.timer.phMsgEnd) {
252252
textMsg.textContent = ''
253253
textMsg.style.color = '#000'
254254
}
@@ -372,7 +372,7 @@ function getMaxButtonWidth () {
372372
const widths = []
373373

374374
Object.keys(translateElements.timer.buttons).forEach((value) => {
375-
controlButton.textContent = translateElements.timer.buttons[value] || 'n/a'
375+
controlButton.textContent = translateElements.timer.buttons[value] || 'n/a'
376376
widths.push(parseFloat(window.getComputedStyle(controlButton).getPropertyValue('width')))
377377
})
378378
// Get the maximum of the two widths

0 commit comments

Comments
 (0)