aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-26 18:30:01 -0500
committerGitHub <noreply@github.com>2021-01-26 18:30:01 -0500
commit8d292363d4d7363134a66e6d35e549f4634521a1 (patch)
tree880cad7f3f2e279401af888335d053c6c80b48cf /ext/bg/js/options.js
parentd11cd7b28f6837c38a566461dc124799ac6736c9 (diff)
Update clipboard options organization (#1318)
* Update options organization * Update general.enableClipboardPopups to clipboard.enableBackgroundMonitor * Update general.enableClipboardMonitor to clipboard.enableSearchPageMonitor * Update general.maximumClipboardSearchLength to clipboard.maximumSearchLength * Update general.autoSearchClipboardContent to clipboard.autoSearchContent
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 14b858aa..02caa5a2 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -669,8 +669,10 @@ class OptionsUtil {
// Updated handlebars templates to include "stroke-count" definition.
// Updated global.useSettingsV2 to be true (opt-out).
// Added audio.customSourceType.
- // Added general.autoSearchClipboardContent.
- // Forced general.enableClipboardMonitor to false due to a bug which caused its value to not be read.
+ // Moved general.enableClipboardPopups => clipboard.enableBackgroundMonitor.
+ // Moved general.enableClipboardMonitor => clipboard.enableSearchPageMonitor. Forced value to false due to a bug which caused its value to not be read.
+ // Moved general.maximumClipboardSearchLength => clipboard.maximumSearchLength.
+ // Added clipboard.autoSearchContent.
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v8.handlebars');
options.global.useSettingsV2 = true;
for (const profile of options.profiles) {
@@ -730,8 +732,15 @@ class OptionsUtil {
windowState: 'normal'
};
profile.options.audio.customSourceType = 'audio';
- profile.options.general.autoSearchClipboardContent = true;
- profile.options.general.enableClipboardMonitor = false;
+ profile.options.clipboard = {
+ enableBackgroundMonitor: profile.options.general.enableClipboardPopups,
+ enableSearchPageMonitor: false,
+ autoSearchContent: true,
+ maximumSearchLength: profile.options.general.maximumClipboardSearchLength
+ };
+ delete profile.options.general.enableClipboardPopups;
+ delete profile.options.general.enableClipboardMonitor;
+ delete profile.options.general.maximumClipboardSearchLength;
}
return options;
}