From c728448a4d05268d4febb9950a39d517a75ea052 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 18 Dec 2020 11:24:43 -0500 Subject: Maximum clipboard search length (#1118) * Add maximumClipboardSearchLength an option * Add setting * Add limits * Update tests --- ext/bg/js/options.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ext/bg/js/options.js') diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 5fb10516..876079dc 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -481,6 +481,10 @@ class OptionsUtil { { async: true, update: this._updateVersion6.bind(this) + }, + { + async: false, + update: this._updateVersion7.bind(this) } ]; } @@ -654,4 +658,13 @@ class OptionsUtil { templates = templates.replace(/\bcompactGlossaries=((?:\.*\/)*)compactGlossaries\b/g, (g0, g1) => `${g0} data=${g1}.`); return templates; } + + _updateVersion7(options) { + // Version 7 changes: + // Added general.maximumClipboardSearchLength. + for (const profile of options.profiles) { + profile.options.general.maximumClipboardSearchLength = 1000; + } + return options; + } } -- cgit v1.2.3