const tilesSound = document.getElementById("tiles-sound");
if (tilesSound) {
+
+ /* migration of old settings for tiles sound */
+ const oldSetting = getSetting("trivabbleTilesSound");
+ if (oldSetting) {
+ setSetting("ENABLE_TILE_SOUND", oldSetting === "true");
+ delete localStorage.trivabbleTilesSound;
+ }
+
tilesSound.checked = getSetting("ENABLE_TILE_SOUND");
tilesSound.onclick = function () {
setSetting("ENABLE_TILE_SOUND", this.checked);
const msgSound = document.getElementById("msg-sound");
if (msgSound) {
+
+ /* migration of old settings for message sound */
+ const oldSetting = getSetting("trivabbleMsgSound");
+ if (oldSetting) {
+ setSetting("ENABLE_MSG_SOUND", oldSetting === "true");
+ delete localStorage.trivabbleMsgSound;
+ }
+
msgSound.checked = getSetting("ENABLE_MSG_SOUND");
msgSound.onclick = function () {
setSetting("ENABLE_MSG_SOUND", this.checked);