summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/extensions/ext-theme.js
blob: 5ff39b79c08f532515e16ef34ca6d39ba46d6593 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"use strict";

XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
                                  "resource://gre/modules/Preferences.jsm");

/* eslint-disable mozilla/balanced-listeners */
extensions.on("manifest_theme", (type, directive, extension, manifest) => {
  let enabled = Preferences.get("extensions.webextensions.themes.enabled");
  extension.emit("test-message", "themes-enabled", enabled);

  if (enabled) {
    // Apply theme only if themes are enabled.
  }
});

extensions.on("shutdown", (type, extension) => {
  // Remove theme only if it has been applied.
});
/* eslint-enable mozilla/balanced-listeners */