refactor: make ts scripts more readable

This commit is contained in:
2026-04-15 00:18:21 +02:00
parent 3f0ad8f34b
commit f65e098b9d
5 changed files with 269 additions and 208 deletions

View File

@@ -1,5 +1,6 @@
((): void => {
const jstOffsetMinutes = 9 * 60
export {}
const jstOffsetMinutes = 9 * 60
type ParsedBroadcast = {
day: string
@@ -241,6 +242,9 @@
nodes.forEach((node: Element): void => updateNode(node, localOffsetMinutes))
}
const initTimezoneConversion = (): void => {
document.addEventListener('DOMContentLoaded', updateAll)
document.body.addEventListener('htmx:afterSwap', updateAll)
})()
}
initTimezoneConversion()