summaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
authorJames Maa <jmaa@berkeley.edu>2024-06-10 10:59:54 -0700
committerGitHub <noreply@github.com>2024-06-10 17:59:54 +0000
commite24075e1a91ab8b58bb5836cf7abcefae5cbf8c3 (patch)
tree57881c2de6a9d75185a390741d404d61d5c9ce69 /ext/js/data
parent8eea3661714c64857aa32a8662f7cca6674dd3a4 (diff)
Add context menu interface for Yomitan (#1028)
* --wip-- [skip ci] * Draft * Remove weird code * Use existing API instead of dulpicating * Small improvements * remove console.log * remove console.log * Add setting for contextMenu * Fix test * Address comments * Add option-util upgrade * fix option-utils
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/options-util.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 5ef30adb..c6bdf025 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -546,6 +546,7 @@ export class OptionsUtil {
this._updateVersion36,
this._updateVersion37,
this._updateVersion38,
+ this._updateVersion39,
];
/* eslint-enable @typescript-eslint/unbound-method */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
@@ -1314,6 +1315,16 @@ export class OptionsUtil {
}
/**
+ * - Add new setting enableContextMenuScanSelected
+ * @type {import('options-util').UpdateFunction}
+ */
+ async _updateVersion39(options) {
+ for (const profile of options.profiles) {
+ profile.options.general.enableContextMenuScanSelected = true;
+ }
+ }
+
+ /**
* @param {string} url
* @returns {Promise<chrome.tabs.Tab>}
*/