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
2 changes: 1 addition & 1 deletion core/template/cdowntime/control/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ selectorLang.addEventListener('change', () => {
})

timeData.addEventListener('change', () => {
test.textContent = `${timeData.value} [ ${new Date(timeData.value).getTime()} ]`
socket.send(JSON.stringify({ action: 'changeTimeCdownTime', time: new Date(timeData.value).getTime(), classElement }))
})

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

// Add an event listener to the main container
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obs-timer-controller",
"version": "1.0.7",
"version": "1.0.8",
"description": "Handling browser sources for OBS related to timers and countdowns.",
"main": "server.js",
"repository": {
Expand All @@ -24,9 +24,9 @@
"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.7 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"",
"pkg-linux": "electron-packager . OBS-Timer-Controller --platform=linux --arch=x64 --app-version=1.0.7 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"",
"pkg-mac": "electron-packager . OBS-Timer-Controller --platform=darwin --arch=x64 --app-version=1.0.7 --out=dist --overwrite --icon=icon.icns --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"",
"pkg-win": "electron-packager . OBS-Timer-Controller --platform=win32 --arch=x64 --app-version=1.0.8 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"",
"pkg-linux": "electron-packager . OBS-Timer-Controller --platform=linux --arch=x64 --app-version=1.0.8 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"",
"pkg-mac": "electron-packager . OBS-Timer-Controller --platform=darwin --arch=x64 --app-version=1.0.8 --out=dist --overwrite --icon=icon.icns --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"",
"pkg-all": "npm run pkg-win && npm run pkg-linux"
},
"author": "XtoManuel",
Expand Down
15 changes: 8 additions & 7 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ const actions = {
changeTimeCdown: (ws, data) => handleChangeTimeCdown(data),
changeTimeCdownTime: (ws, data) => handleChangeTimeCdownTime(data),
changeTimeExtensible: (ws, data) => handleChangeTimeExtensible(data),
changeTimezoneTime: (ws, data) => handleChangeTimezoneTime(data),
changeTimezoneTime: (ws, data) => {
handleChangeTimezoneTime(data)
sendToAllClients({ action: 'reload' })
},
editMsg: (ws, data) => editMsg(data),
checkboxStopAdd: (ws, data) => changeCheckboxStopAdd(data),
checkboxPauseAdd: (ws, data) => changeCheckboxPauseAdd(data),
Expand All @@ -114,7 +117,10 @@ const actions = {
getVariables: (ws, data) => sendVariableData(ws, GlobalVariables, Config, data.classElement),
createData: (ws, data) => createData(data),
removeData: (ws, data) => removeData(data),
stopCode: () => stopCode()
stopCode: () => {
console.log('The code has stopped successfully')
process.exit()
}
}

function sendToAllClients (data) {
Expand Down Expand Up @@ -292,11 +298,6 @@ function removeData (data) {
saveVariablesToYAML(GlobalVariables)
}

function stopCode () {
console.log('The code has stopped successfully')
process.exit()
}

// WebSocket connections handling
wss.on('connection', (ws) => {
ws.send(JSON.stringify({ fonts: fontOptions }))
Expand Down