diff --git a/core/template/cdown/control/control.js b/core/template/cdown/control/control.js index 61ccf72..936eb13 100644 --- a/core/template/cdown/control/control.js +++ b/core/template/cdown/control/control.js @@ -157,7 +157,7 @@ selectorLang.addEventListener('change', () => { }) controlButton.addEventListener('click', () => { - if (controlButton.textContent === translateElements.timer.buttons.start || 'n/a') { + if (controlButton.textContent === translateElements.timer.buttons.start) { socket.send(JSON.stringify({ action: 'startTimer', classElement })) } else { socket.send(JSON.stringify({ action: 'pauseCdown', classElement })) @@ -218,7 +218,7 @@ subContainer.addEventListener('click', (event) => { }) textMsg.addEventListener('focus', () => { - if (textMsg.textContent === translateElements.timer.phMsgEnd || 'n/a') { + if (textMsg.textContent === translateElements.timer.phMsgEnd) { textMsg.textContent = '' textMsg.style.color = '#000' } diff --git a/core/template/cdowntime/control/control.js b/core/template/cdowntime/control/control.js index 042eaa5..7c2abeb 100644 --- a/core/template/cdowntime/control/control.js +++ b/core/template/cdowntime/control/control.js @@ -107,7 +107,7 @@ socket.addEventListener('message', (event) => { // Perform necessary actions with the variables here textMsg.textContent = elementVariables.msgEnd if (elementVariables.msgEnd === '') { - textMsg.textContent = translateElements.timer.phMsgEnd || 'n/a' + textMsg.textContent = translateElements.timer.phMsgEnd || 'n/a' textMsg.style.color = '#555' } else { textMsg.style.color = '#000' } 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) => { }) textMsg.addEventListener('focus', () => { - if (textMsg.textContent === translateElements.timer.phMsgEnd || 'n/a') { + if (textMsg.textContent === translateElements.timer.phMsgEnd) { textMsg.textContent = '' textMsg.style.color = '#000' } diff --git a/core/template/crono/control/control.js b/core/template/crono/control/control.js index ac832e3..fe0cb08 100644 --- a/core/template/crono/control/control.js +++ b/core/template/crono/control/control.js @@ -139,7 +139,7 @@ languageSelector.addEventListener('change', () => { }) controlButton.addEventListener('click', () => { - if (controlButton.textContent === translateElements.timer.buttons.start || 'n/a') { + if (controlButton.textContent === translateElements.timer.buttons.start) { socket.send(JSON.stringify({ action: 'startTimer', classElement })) } else { socket.send(JSON.stringify({ action: 'pauseCrono', classElement })) diff --git a/core/template/extensible/control/control.js b/core/template/extensible/control/control.js index a9e277d..3296250 100644 --- a/core/template/extensible/control/control.js +++ b/core/template/extensible/control/control.js @@ -179,7 +179,7 @@ selectorLang.addEventListener('change', () => { }) controlButton.addEventListener('click', () => { - if (controlButton.textContent === translateElements.timer.buttons.start || 'n/a') { + if (controlButton.textContent === translateElements.timer.buttons.start) { socket.send(JSON.stringify({ action: 'startTimer', classElement })) } else { socket.send(JSON.stringify({ action: 'pauseExtensible', classElement })) @@ -248,7 +248,7 @@ checkboxPauseAdd.addEventListener('change', () => { }) textMsg.addEventListener('focus', () => { - if (textMsg.textContent === translateElements.timer.phMsgEnd || 'n/a') { + if (textMsg.textContent === translateElements.timer.phMsgEnd) { textMsg.textContent = '' textMsg.style.color = '#000' } @@ -372,7 +372,7 @@ function getMaxButtonWidth () { const widths = [] Object.keys(translateElements.timer.buttons).forEach((value) => { - controlButton.textContent = translateElements.timer.buttons[value] || 'n/a' + controlButton.textContent = translateElements.timer.buttons[value] || 'n/a' widths.push(parseFloat(window.getComputedStyle(controlButton).getPropertyValue('width'))) }) // Get the maximum of the two widths