Skip to content

Commit

Permalink
Merge pull request #11 from BrowserSourcesForOBS/dev
Browse files Browse the repository at this point in the history
Update format
  • Loading branch information
XtoManuel authored Oct 13, 2023
2 parents 7795732 + f17707d commit d58ea67
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions core/template/cdown/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand Down Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions core/template/cdowntime/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion core/template/crono/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand Down
6 changes: 3 additions & 3 deletions core/template/extensible/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand Down Expand Up @@ -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'
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d58ea67

Please sign in to comment.