summaryrefslogtreecommitdiffstats
path: root/application/basilisk/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'application/basilisk/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm')
-rw-r--r--application/basilisk/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm42
1 files changed, 42 insertions, 0 deletions
diff --git a/application/basilisk/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm b/application/basilisk/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm
new file mode 100644
index 000000000..fd981bca3
--- /dev/null
+++ b/application/basilisk/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm
@@ -0,0 +1,42 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+this.EXPORTED_SYMBOLS = ["DevEdition"];
+
+const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+const THEME_ID = "firefox-devedition@mozilla.org";
+
+Cu.import("resource://gre/modules/LightweightThemeManager.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/Task.jsm");
+
+this.DevEdition = {
+ init(libDir) {},
+
+ configurations: {
+ devEditionLight: {
+ applyConfig: Task.async(() => {
+ Services.prefs.setCharPref("devtools.theme", "light");
+ LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(THEME_ID);
+ Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", true);
+ }),
+ },
+ devEditionDark: {
+ applyConfig: Task.async(() => {
+ Services.prefs.setCharPref("devtools.theme", "dark");
+ LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(THEME_ID);
+ Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", true);
+ }),
+ },
+ devEditionOff: {
+ applyConfig: Task.async(() => {
+ Services.prefs.clearUserPref("devtools.theme");
+ LightweightThemeManager.currentTheme = null;
+ Services.prefs.clearUserPref("browser.devedition.theme.showCustomizeButton");
+ }),
+ },
+ },
+};