I read the description.
If only the words are to be considered, it is an easy thing of just making a promise that starts when JS starts, and resolves to getting response JSON from your static server, and then doing all the import stuff, without click.
As you mentioned that it is initiated on click, that will still remain, but onload, first thing will be it will auto fetch from given location and update settings, and afterwards if a click is performed, normal functionality that you defined earlier will follow.
If this sums up your project requirements, reply back.