From 8a44726f89dff986dd7dc2e480918a6dd11928ae Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 23 Jan 2021 01:01:53 +0100 Subject: [PATCH] Save blackboard mode and activity detection across reloads. --- static/galene.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/static/galene.js b/static/galene.js index 1566597..70e9fc0 100644 --- a/static/galene.js +++ b/static/galene.js @@ -227,9 +227,19 @@ function reflectSettings() { store = true; } - getInputElement('activitybox').checked = settings.activityDetection; + if(settings.hasOwnProperty('blackboardMode')) { + getInputElement('blackboardbox').checked = settings.blackboardMode; + } else { + settings.blackboardMode = getInputElement('blackboardbox').checked; + store = true; + } - getInputElement('blackboardbox').checked = settings.blackboardMode; + if(settings.hasOwnProperty('activityDetection')) { + getInputElement('activitybox').checked = settings.activityDetection; + } else { + settings.activityDetection = getInputElement('activitybox').checked; + store = true; + } if(store) storeSettings(settings);