summaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js12
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;
+}