Update on the encyclopedia GUI page:
I was not happy with the code at all, it was written in a very "unconventional" (bad) way and not really integrated into 0ad's codebase.
That's why I decided to basically rewrite everything.
The various panels are now different classes (and have their own XML and JS files). Values are now (as usual with JavaScript) stored in properties and passed between them. The CivDropdown (as well as the related civData) is created and used from already implemented classes and functions.
And countless more smaller improvements. All in all, I guess the code will be around 30% more efficient than before.
But most importantly: the code is now much much more readable and usable, and no longer embarrassing to show. It might not seem like a big step to some, because essentially all I did was lift it to the expected standard, but it certainly is for me. Because I only had little experience I programmed the project in the wrong direction. Yes, everything worked just fine on the surface, but I eventually had to take my time to "fix" it.
And that being done now means I can actually start designing and cleaning up the UI. Plus, because the code is now much better integrated into 0ad, I'm able to "intertwine" it with 0ad and make it feel less like a seperate entity. I, for example, already added a button to the structure tree, civilisation overview and the small unit/building/technology viewer page to open the respective encyclopaedia article.
If you want to take a look at the code, I put it on a GitHub repo: https://github.com/indoptogopt/GUI-page-for-0ads-encyclopedia