Skip to content

Commit

Permalink
Add scanning.scanAltText Update Function
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jul 3, 2024
1 parent 8d3b19d commit c8c77b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ext/js/data/options-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,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) {
Expand Down Expand Up @@ -1349,6 +1350,17 @@ export class OptionsUtil {
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v41.handlebars');
}

/**
* - Added scanning.scanAltText
* @type {import('options-util').UpdateFunction}
* @param {import('settings').Options} options
*/
async _updateVersion42(options) {
for (const profile of options.profiles) {
profile.options.scanning.scanAltText = true;
}
}

/**
* @param {string} url
* @returns {Promise<chrome.tabs.Tab>}
Expand Down

0 comments on commit c8c77b8

Please sign in to comment.