diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-03-02 20:23:56 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-03-02 20:23:56 -0800 |
commit | 5ecca4627e4edd54b8af606c69aa51e4b659deef (patch) | |
tree | 3ef86e9408c6050a895c966704bd17b307e1ce55 /ext/bg/js/options.js | |
parent | b9c849a02078a5d6b99a0650b1ef3373232dc0c4 (diff) |
enable and disable via toggle switch
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 7a47c702..198deb6d 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -145,3 +145,15 @@ function optionsSave(options) { chrome.storage.sync.set(options, resolve); }); } + +function optionsEnabledDicts(options) { + const dictionaries = {}; + for (const title in options.dictionaries) { + const dictionary = options.dictionaries[title]; + if (dictionary.enabled) { + dictionaries[title] = dictionary; + } + } + + return dictionaries; +} |