Add a pref to know if the alt-text must be automatically generated (bug 1909310)

This commit is contained in:
Calixte Denizet 2024-07-22 22:09:08 +02:00
parent 91655aae7f
commit 042183b89b
4 changed files with 21 additions and 12 deletions

View file

@ -328,8 +328,8 @@ class MLManager {
return FirefoxCom.requestAsync("mlGuess", data);
}
enable({ altTextLearnMoreUrl, enableAltText, listenToProgress }) {
if (enableAltText) {
enable({ altTextLearnMoreUrl, enableGuessAltText, listenToProgress }) {
if (enableGuessAltText) {
this.#loadAltTextEngine(listenToProgress);
}
// The `altTextLearnMoreUrl` is used to provide a link to the user to learn