aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
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) {