Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const buttonCdownContainer = document.getElementById('button-container-cdown')
const buttonCdowntimeContainer = document.getElementById('button-container-cdowntime')
const buttonExtensibleContainer = document.getElementById('button-container-extensible')
const buttonTimeContainer = document.getElementById('button-container-time')
const buttonClose = document.getElementById('stop-code')
const buttonClose = document.getElementById('stopCode')
const buttonWiki = document.getElementById('button-wiki')
const leftButtons = document.getElementById('left-button')
const textVersion = document.getElementById('span-version')
Expand Down Expand Up @@ -102,7 +102,7 @@ socket.addEventListener('close', (event) => {
})

window.addEventListener('unload', (event) => {
socket.send(JSON.stringify({ action: 'stop-code' }))
socket.send(JSON.stringify({ action: 'stopCode' }))
})

buttonClose.addEventListener('click', () => {
Expand Down
2 changes: 1 addition & 1 deletion core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<body>
<div class="top-bar">
<span class="left-button" id="left-button">
<button class="close-button" id="stop-code">
<button class="close-button" id="stopCode">
<i class="fas fa-x"></i>
</button>
<a
Expand Down
8 changes: 4 additions & 4 deletions core/template/cdown/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ selectorLang.addEventListener('change', () => {

controlButton.addEventListener('click', () => {
if (controlButton.textContent === translateElements.timer.buttons.start) {
socket.send(JSON.stringify({ action: 'startCdown', classElement }))
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
} else {
socket.send(JSON.stringify({ action: 'pauseCdown', classElement }))
}
Expand Down Expand Up @@ -196,7 +196,7 @@ addContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('addtime-')) {
socket.send(JSON.stringify({ action: 'editTimeCdown', time: `+${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `+${data[1]}`, classElement }))
}
}
})
Expand All @@ -212,7 +212,7 @@ subContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('subtime-')) {
socket.send(JSON.stringify({ action: 'editTimeCdown', time: `-${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `-${data[1]}`, classElement }))
}
}
})
Expand All @@ -225,7 +225,7 @@ textMsg.addEventListener('focus', () => {
})

textMsg.addEventListener('blur', () => {
socket.send(JSON.stringify({ action: 'editMsgCdown', msg: textMsg.textContent, classElement }))
socket.send(JSON.stringify({ action: 'editMsg', msg: textMsg.textContent, classElement }))
if (textMsg.textContent === '') {
textMsg.textContent = translateElements.timer.phMsgEnd
textMsg.style.color = '#555'
Expand Down
8 changes: 4 additions & 4 deletions core/template/cdowntime/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ timeData.addEventListener('change', () => {
})

timezoneSelector.addEventListener('change', () => {
socket.send(JSON.stringify({ action: 'changeTimezoneCdownTime', timezone: timezoneSelector.value, classElement }))
socket.send(JSON.stringify({ action: 'changeTimezoneTime', timezone: timezoneSelector.value, classElement }))
window.location.reload()
})

Expand All @@ -167,7 +167,7 @@ addContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('addtime-')) {
socket.send(JSON.stringify({ action: 'editTimeCdownTime', time: `+${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `+${data[1]}`, classElement }))
}
}
})
Expand All @@ -183,7 +183,7 @@ subContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('subtime-')) {
socket.send(JSON.stringify({ action: 'editTimeCdownTime', time: `-${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `-${data[1]}`, classElement }))
}
}
})
Expand All @@ -196,7 +196,7 @@ textMsg.addEventListener('focus', () => {
})

textMsg.addEventListener('blur', () => {
socket.send(JSON.stringify({ action: 'editMsgCdownTime', msg: textMsg.textContent, classElement }))
socket.send(JSON.stringify({ action: 'editMsg', msg: textMsg.textContent, classElement }))
if (textMsg.textContent === '') {
textMsg.textContent = translateElements.timer.phMsgEnd
textMsg.style.color = '#555'
Expand Down
6 changes: 3 additions & 3 deletions core/template/crono/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ languageSelector.addEventListener('change', () => {

controlButton.addEventListener('click', () => {
if (controlButton.textContent === translateElements.timer.buttons.start) {
socket.send(JSON.stringify({ action: 'startCrono', classElement }))
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
} else {
socket.send(JSON.stringify({ action: 'pauseCrono', classElement }))
}
Expand All @@ -162,7 +162,7 @@ addContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('addtime-')) {
socket.send(JSON.stringify({ action: 'editTimeCrono', time: `+${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `+${data[1]}`, classElement }))
}
}
})
Expand All @@ -178,7 +178,7 @@ subContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('subtime-')) {
socket.send(JSON.stringify({ action: 'editTimeCrono', time: `-${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `-${data[1]}`, classElement }))
}
}
})
Expand Down
8 changes: 4 additions & 4 deletions core/template/extensible/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ selectorLang.addEventListener('change', () => {

controlButton.addEventListener('click', () => {
if (controlButton.textContent === translateElements.timer.buttons.start) {
socket.send(JSON.stringify({ action: 'startExtensible', classElement }))
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
} else {
socket.send(JSON.stringify({ action: 'pauseExtensible', classElement }))
}
Expand Down Expand Up @@ -218,7 +218,7 @@ addContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('addtime-')) {
socket.send(JSON.stringify({ action: 'editTimeExtensible', time: `+${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `+${data[1]}`, classElement }))
}
}
})
Expand All @@ -234,7 +234,7 @@ subContainer.addEventListener('click', (event) => {
const data = button.id.split('-')

if (button.id.startsWith('subtime-')) {
socket.send(JSON.stringify({ action: 'editTimeExtensible', time: `-${data[1]}`, classElement }))
socket.send(JSON.stringify({ action: 'editTime', time: `-${data[1]}`, classElement }))
}
}
})
Expand All @@ -255,7 +255,7 @@ textMsg.addEventListener('focus', () => {
})

textMsg.addEventListener('blur', () => {
socket.send(JSON.stringify({ action: 'editMsgExtensible', msg: textMsg.textContent, classElement }))
socket.send(JSON.stringify({ action: 'editMsg', msg: textMsg.textContent, classElement }))
if (textMsg.textContent === '') {
textMsg.textContent = translateElements.timer.phMsgEnd
textMsg.style.color = '#555'
Expand Down
4 changes: 2 additions & 2 deletions functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ exports.getFonts = () => {
// Initialize configuration settings
exports.initConfig = async () => {
const Config = {
lang: await getLanguage(),
themeDark: await darkThemeCheck(),
lang: await getLanguage() || 'en',
themeDark: await darkThemeCheck() || false,
version: await getVersion(),
versionRelease: await getVersionRelease()
}
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obs-timer-controller",
"version": "1.0.4",
"version": "1.0.5",
"description": "Handling browser fonts for OBS related to timers and countdowns.",
"main": "server.js",
"repository": {
Expand All @@ -23,7 +23,10 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"node": "node . test",
"pkg-win": "electron-packager . OBS-Timer-Controller --platform=win32 --arch=x64 --app-version=1.0.4 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser fonts for OBS related to timers and countdowns.\""
"pkg-win": "electron-packager . OBS-Timer-Controller --platform=win32 --arch=x64 --app-version=1.0.5 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser fonts for OBS related to timers and countdowns.\"",
"pkg-linux": "electron-packager . OBS-Timer-Controller --platform=linux --arch=x64 --app-version=1.0.5 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser fonts for OBS related to timers and countdowns.\"",
"pkg-mac": "electron-packager . OBS-Timer-Controller --platform=darwin --arch=x64 --app-version=1.0.5 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser fonts for OBS related to timers and countdowns.\"",
"pkg-all": "npm run pkg-win && npm run pkg-linux && npm run pkg-mac"
},
"author": "XtoManuel",
"license": "ISC",
Expand Down
Loading