]> Stephen's Gitweb - donsol-js.git/commitdiff
Switch themes on <select> change event
authorStephen Jianu <stephen@stephenjianu.com>
Sun, 31 Dec 2023 22:39:20 +0000 (16:39 -0600)
committerStephen Jianu <stephen@stephenjianu.com>
Sun, 31 Dec 2023 22:39:20 +0000 (16:39 -0600)
sources/scripts/settings.js

index 773d6dcb9c31945fec08c66d4bc47bd7d750e8df..96931b6450b127eada4fdfc432b839d7af7d2cf5 100644 (file)
@@ -14,6 +14,7 @@ function Settings () {
     this.theme_button.innerHTML += '<option value=\"gameboy\">Game Boy</option>'
     this.theme_button.innerHTML += '<option value=\"nightowl\">Night Owl</option>'
     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) })
 
     this.element.appendChild(this.theme_button)