diff options
author | Alex Yatskov <FooSoft@users.noreply.github.com> | 2019-09-16 18:32:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-16 18:32:01 -0700 |
commit | e3fb9603e22c5cbdc7cdf00b60e8ccbf1c7e2116 (patch) | |
tree | 912db53d6c496d8b2f26178db091aaaaaba729b4 /ext/bg/js/backend.js | |
parent | ae696c32eb572b3824cadcf3ab8852725c793191 (diff) | |
parent | 9fb89d8f7d77dd70b2493f730d8b224c994a6e98 (diff) |
Merge pull request #209 from toasted-nutbread/settings-profiles
Settings 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) { |