From 13261e0962375f21e0c01319119c029814f4bedc Mon Sep 17 00:00:00 2001 From: Stephen Jianu Date: Sun, 25 Jan 2026 15:35:35 -0600 Subject: [PATCH] Add Teletext theme --- sources/scripts/donsol.js | 11 +++++++++++ sources/scripts/player.js | 3 +++ sources/scripts/settings.js | 1 + 3 files changed, 15 insertions(+) diff --git a/sources/scripts/donsol.js b/sources/scripts/donsol.js index ad44b82..88942f1 100644 --- a/sources/scripts/donsol.js +++ b/sources/scripts/donsol.js @@ -480,6 +480,17 @@ function Donsol () { b_low: '#b3b3b3', b_inv: '#0e7242' } + this.teletextTheme = { + background: '#000000', + f_high: '#ffffff', + f_med: '#ffff00', + f_low: '#00FF00', + f_inv: '#000000', + b_high: '#ff00ff', + b_med: '#ff0000', + b_low: '#0000ff', + b_inv: '#ffffff' + } this.theme = new Theme(this.defaultTheme) diff --git a/sources/scripts/player.js b/sources/scripts/player.js index 69cef26..84c6c0a 100644 --- a/sources/scripts/player.js +++ b/sources/scripts/player.js @@ -278,6 +278,9 @@ function Player () { if (theme_value.localeCompare('teenage') === 0) { new_theme = donsol.teenageTheme } + if (theme_value.localeCompare('teletext') === 0) { + new_theme = donsol.teletextTheme + } donsol.theme = new Theme(new_theme) donsol.theme.load(new_theme) donsol.theme.install(document.body) diff --git a/sources/scripts/settings.js b/sources/scripts/settings.js index 1e12e60..be0c24e 100644 --- a/sources/scripts/settings.js +++ b/sources/scripts/settings.js @@ -53,6 +53,7 @@ function Settings () { this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' + this.theme_button.innerHTML += '' this.theme_button.addEventListener('mousedown', () => { donsol.player.change_theme(this.theme_button.value) }) this.theme_button.addEventListener('change', () => { donsol.player.change_theme(this.theme_button.value) }) -- 2.39.5