Preserve unsupported settings #104

This commit is contained in:
ManeraKai 2022-03-13 15:11:44 +03:00
parent d26d4211b6
commit 2b53e6c59f
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 4 additions and 1 deletions

View File

@ -590,7 +590,10 @@ function initInvidiousCookies() {
},
cookie => {
let prefs = {};
if (cookie) browser.cookies.remove({ url: instanceUrl, name: "PREFS" })
if (cookie) {
prefs = JSON.parse(decodeURIComponent(cookie.value));
browser.cookies.remove({ url: instanceUrl, name: "PREFS" });
}
if (invidiousAlwaysProxy != "DEFAULT") prefs.local = invidiousAlwaysProxy == 'true';
if (applyThemeToSites && theme != "DEFAULT") prefs.dark_mode = theme;