We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6805a9a commit 39b7fe1Copy full SHA for 39b7fe1
background.js
@@ -16,3 +16,22 @@ function toggleTheme() {
16
}
17
18
browser.action.onClicked.addListener(toggleTheme);
19
+
20
+function toggleSystemTheme() {
21
+ browser.management.get("default-theme@mozilla.org").then(info => {
22
+ browser.management.setEnabled("default-theme@mozilla.org", !info.enabled);
23
+ });
24
+}
25
26
+browser.menus.create({
27
+ id: "use-systemtheme",
28
+ type: "normal",
29
+ title: "Use system theme (auto)",
30
+ contexts: ["action"],
31
+ icons: {
32
+ "16": "icons/browser.svg",
33
+ "32": "icons/browser.svg"
34
+ },
35
+});
36
37
+browser.menus.onClicked.addListener(toggleSystemTheme);
0 commit comments