}
function saveSettings() {
- settingsString = JSON.stringify({showcurrent: show_current.checked, shownext: show_next.checked});
- console.log("Saving cookie " + settingsString);
+ settingsString = JSON.stringify({showcurrent: show_current.checked, shownext: show_next.checked, enable_shortcuts: shortcuts.checked});
setCookie(COOKIENAME, settingsString, COOKIEEXP);
}
function initSettings() {
- console.log("Retrieving cookie");
if (getCookie(COOKIENAME) == 0) {
- console.log("No cookie found - setting new cookie");
+ if (window.obssstudio) {
+ shortcuts.checked = False;
+ show_current.checked = False;
+ }
saveSettings()
} else {
cookie = JSON.parse(getCookie(COOKIENAME));
- console.log("Found cookie " + cookie);
show_current.checked = cookie.showcurrent;
show_next.checked = cookie.shownext;
+ shortcuts.checked = cookie.enable_shortcuts;
sync_current();
sync_next();
}