diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-07 19:50:58 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-15 15:56:53 -0400 |
commit | c8171f5ec7612f0ba147d7e0887cd8c30a527827 (patch) | |
tree | 4d2c97faefdbc9991333094670f726d4c303ebab /ext/bg/js/backend.js | |
parent | 58778612778df944628b4697dc51caccbeb22f79 (diff) |
Add preliminary support for profiles
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 10 |
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) { |