Add a pref containing the url for the sumo page about alt text (bug 1909097)

This commit is contained in:
Calixte Denizet 2024-07-21 14:48:39 +02:00
parent ebb3d27125
commit 5860c7bcc9
4 changed files with 18 additions and 1 deletions

View file

@ -324,10 +324,14 @@ class MLManager {
return FirefoxCom.requestAsync("mlGuess", data);
}
enable({ enableAltText, listenToProgress }) {
enable({ altTextLearnMoreUrl, enableAltText, listenToProgress }) {
if (enableAltText) {
this.#loadAltTextEngine(listenToProgress);
}
// The `altTextLearnMoreUrl` is used to provide a link to the user to learn
// more about the "alt text" feature.
// The link is used in the Alt Text dialog or in the Image Settings.
this.altTextLearnMoreUrl = altTextLearnMoreUrl;
}
async #loadAltTextEngine(listenToProgress) {