about summary refs log tree commit diff stats
path: root/src/pages/options
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-09-28 20:18:32 +0100
committerHygna <hygna@proton.me>2022-09-28 20:18:32 +0100
commit800d0cbd9fd4286f0affcb5a28f01f03532655fb (patch)
tree4cc267629d8b7ff4656e83f71d17c2e102b09240 /src/pages/options
parentStarted converting storage format (diff)
downloadlibredirect-800d0cbd9fd4286f0affcb5a28f01f03532655fb.zip
Unify cookies
Diffstat (limited to 'src/pages/options')
-rw-r--r--src/pages/options/index.html2
-rw-r--r--src/pages/options/init.js4
-rw-r--r--src/pages/options/widgets/general.ejs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/pages/options/index.html b/src/pages/options/index.html
index 20592637..6ef33723 100644
--- a/src/pages/options/index.html
+++ b/src/pages/options/index.html
@@ -99,7 +99,7 @@
   <div class="some-block option-block">
     <h4 data-localise="__MSG_theme__">Theme</h4>
     <select id="theme">
-      <option value="DEFAULT" data-localise="__MSG_system__">System</option>
+      <option value="detect" data-localise="__MSG_detect__">Detect</option>
       <option value="light" data-localise="__MSG_light__">Light</option>
       <option value="dark" data-localise="__MSG_dark__">Dark</option>
     </select>
diff --git a/src/pages/options/init.js b/src/pages/options/init.js
index 5b679da4..cac23748 100644
--- a/src/pages/options/init.js
+++ b/src/pages/options/init.js
@@ -4,8 +4,8 @@ import localise from "../../assets/javascripts/localise.js"
 
 function changeTheme() {
 	return new Promise(resolve => {
-		browser.storage.local.get("theme", r => {
-			switch (r.theme) {
+		browser.storage.local.get("options", r => {
+			switch (r.options.theme) {
 				case "dark":
 					document.body.classList.add("dark-theme")
 					document.body.classList.remove("light-theme")
diff --git a/src/pages/options/widgets/general.ejs b/src/pages/options/widgets/general.ejs
index fa85e8bc..8f7ab029 100644
--- a/src/pages/options/widgets/general.ejs
+++ b/src/pages/options/widgets/general.ejs
@@ -6,7 +6,7 @@
   <div class="some-block option-block">
     <h4 data-localise="__MSG_theme__">Theme</h4>
     <select id="theme">
-      <option value="DEFAULT" data-localise="__MSG_system__">System</option>
+      <option value="detect" data-localise="__MSG_detect__">Detect</option>
       <option value="light" data-localise="__MSG_light__">Light</option>
       <option value="dark" data-localise="__MSG_dark__">Dark</option>
     </select>