Skip to content

Commit f04f608

Browse files
authored
Merge pull request #7 from BrowserSourcesForOBS/dev
v1.0.5
2 parents cb8911a + 01dcf1e commit f04f608

File tree

9 files changed

+249
-279
lines changed

9 files changed

+249
-279
lines changed

core/client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const buttonCdownContainer = document.getElementById('button-container-cdown')
55
const buttonCdowntimeContainer = document.getElementById('button-container-cdowntime')
66
const buttonExtensibleContainer = document.getElementById('button-container-extensible')
77
const buttonTimeContainer = document.getElementById('button-container-time')
8-
const buttonClose = document.getElementById('stop-code')
8+
const buttonClose = document.getElementById('stopCode')
99
const buttonWiki = document.getElementById('button-wiki')
1010
const leftButtons = document.getElementById('left-button')
1111
const textVersion = document.getElementById('span-version')
@@ -102,7 +102,7 @@ socket.addEventListener('close', (event) => {
102102
})
103103

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

108108
buttonClose.addEventListener('click', () => {

core/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<body>
2020
<div class="top-bar">
2121
<span class="left-button" id="left-button">
22-
<button class="close-button" id="stop-code">
22+
<button class="close-button" id="stopCode">
2323
<i class="fas fa-x"></i>
2424
</button>
2525
<a

core/template/cdown/control/control.js

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

159159
controlButton.addEventListener('click', () => {
160160
if (controlButton.textContent === translateElements.timer.buttons.start) {
161-
socket.send(JSON.stringify({ action: 'startCdown', classElement }))
161+
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
162162
} else {
163163
socket.send(JSON.stringify({ action: 'pauseCdown', classElement }))
164164
}
@@ -196,7 +196,7 @@ addContainer.addEventListener('click', (event) => {
196196
const data = button.id.split('-')
197197

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

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

227227
textMsg.addEventListener('blur', () => {
228-
socket.send(JSON.stringify({ action: 'editMsgCdown', msg: textMsg.textContent, classElement }))
228+
socket.send(JSON.stringify({ action: 'editMsg', msg: textMsg.textContent, classElement }))
229229
if (textMsg.textContent === '') {
230230
textMsg.textContent = translateElements.timer.phMsgEnd
231231
textMsg.style.color = '#555'

core/template/cdowntime/control/control.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ timeData.addEventListener('change', () => {
151151
})
152152

153153
timezoneSelector.addEventListener('change', () => {
154-
socket.send(JSON.stringify({ action: 'changeTimezoneCdownTime', timezone: timezoneSelector.value, classElement }))
154+
socket.send(JSON.stringify({ action: 'changeTimezoneTime', timezone: timezoneSelector.value, classElement }))
155155
window.location.reload()
156156
})
157157

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

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

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

198198
textMsg.addEventListener('blur', () => {
199-
socket.send(JSON.stringify({ action: 'editMsgCdownTime', msg: textMsg.textContent, classElement }))
199+
socket.send(JSON.stringify({ action: 'editMsg', msg: textMsg.textContent, classElement }))
200200
if (textMsg.textContent === '') {
201201
textMsg.textContent = translateElements.timer.phMsgEnd
202202
textMsg.style.color = '#555'

core/template/crono/control/control.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ languageSelector.addEventListener('change', () => {
140140

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

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

180180
if (button.id.startsWith('subtime-')) {
181-
socket.send(JSON.stringify({ action: 'editTimeCrono', time: `-${data[1]}`, classElement }))
181+
socket.send(JSON.stringify({ action: 'editTime', time: `-${data[1]}`, classElement }))
182182
}
183183
}
184184
})

core/template/extensible/control/control.js

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

181181
controlButton.addEventListener('click', () => {
182182
if (controlButton.textContent === translateElements.timer.buttons.start) {
183-
socket.send(JSON.stringify({ action: 'startExtensible', classElement }))
183+
socket.send(JSON.stringify({ action: 'startTimer', classElement }))
184184
} else {
185185
socket.send(JSON.stringify({ action: 'pauseExtensible', classElement }))
186186
}
@@ -218,7 +218,7 @@ addContainer.addEventListener('click', (event) => {
218218
const data = button.id.split('-')
219219

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

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

257257
textMsg.addEventListener('blur', () => {
258-
socket.send(JSON.stringify({ action: 'editMsgExtensible', msg: textMsg.textContent, classElement }))
258+
socket.send(JSON.stringify({ action: 'editMsg', msg: textMsg.textContent, classElement }))
259259
if (textMsg.textContent === '') {
260260
textMsg.textContent = translateElements.timer.phMsgEnd
261261
textMsg.style.color = '#555'

functions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ exports.getFonts = () => {
128128
// Initialize configuration settings
129129
exports.initConfig = async () => {
130130
const Config = {
131-
lang: await getLanguage(),
132-
themeDark: await darkThemeCheck(),
131+
lang: await getLanguage() || 'en',
132+
themeDark: await darkThemeCheck() || false,
133133
version: await getVersion(),
134134
versionRelease: await getVersionRelease()
135135
}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obs-timer-controller",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Handling browser fonts for OBS related to timers and countdowns.",
55
"main": "server.js",
66
"repository": {
@@ -23,7 +23,10 @@
2323
"scripts": {
2424
"test": "echo \"Error: no test specified\" && exit 1",
2525
"node": "node . test",
26-
"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.\""
26+
"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.\"",
27+
"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.\"",
28+
"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.\"",
29+
"pkg-all": "npm run pkg-win && npm run pkg-linux && npm run pkg-mac"
2730
},
2831
"author": "XtoManuel",
2932
"license": "ISC",

0 commit comments

Comments
 (0)