aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-07 19:50:58 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-15 15:56:53 -0400
commitc8171f5ec7612f0ba147d7e0887cd8c30a527827 (patch)
tree4d2c97faefdbc9991333094670f726d4c303ebab /ext/bg/js/backend.js
parent58778612778df944628b4697dc51caccbeb22f79 (diff)
Add preliminary support for profiles
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 9a300d62..3839da39 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -165,7 +165,15 @@ class Backend {
}
getOptionsSync(optionsContext) {
- return this.options;
+ return this.getProfileSync(optionsContext).options;
+ }
+
+ getProfileSync(optionsContext) {
+ const profiles = this.options.profiles;
+ if (typeof optionsContext.index === 'number') {
+ return profiles[optionsContext.index];
+ }
+ return this.options.profiles[this.options.profileCurrent];
}
setExtensionBadgeBackgroundColor(color) {