aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
authormarv <rotrobmin@gmail.com>2024-07-03 03:00:07 -0700
committerGitHub <noreply@github.com>2024-07-03 10:00:07 +0000
commit066ca66fc4033da39d0aecd73b0f5c200cb3f3ed (patch)
tree64d00048c4dd0b422141a72b9c6b1310f59fc496 /ext/js/data
parentc1f0343feeb8b8a8feaa942022150f971e118659 (diff)
Add Option for Scanning Alt Text (#1169)
* Add Option for Scanning Alt Text * Don't scan alt text if option disabled * Add scanAltText to Options Schema * Add `scanning.scanAltText` Update Function * Bump Options Test Version * Remove Param Annotation
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/options-util.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 8af299d8..850ac81d 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -349,6 +349,7 @@ export class OptionsUtil {
enableOnSearchPage: true,
enableSearchTags: false,
layoutAwareScan: false,
+ scanAltText: true,
},
translation: {
@@ -549,6 +550,7 @@ export class OptionsUtil {
this._updateVersion39,
this._updateVersion40,
this._updateVersion41,
+ this._updateVersion42,
];
/* eslint-enable @typescript-eslint/unbound-method */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
@@ -1349,6 +1351,16 @@ export class OptionsUtil {
}
/**
+ * - Added scanning.scanAltText
+ * @type {import('options-util').UpdateFunction}
+ */
+ async _updateVersion42(options) {
+ for (const profile of options.profiles) {
+ profile.options.scanning.scanAltText = true;
+ }
+ }
+
+ /**
* @param {string} url
* @returns {Promise<chrome.tabs.Tab>}
*/