Skip to content

Avoid loading the dialog window multiple times

Samwilson requested to merge load-once into main

This updates the init logic to only create one instance of the main AutosuggestSitelink object, and to move the initialization code to a new init() method (the old init function is renamed to main() here to avoid confusion).

Since d99574c5 the translations are loaded in the constructor. This means that the loadTranslations() method doesn't need to be called later, so these are removed.

Bug: T361333

Merge request reports