JuliaLang / www_old.julialang.org

Julia Project web site (Old)
http://www_old.julialang.org/
Other
150 stars 276 forks source link

Use MutationObserver API to avoid a null access error #688

Closed waldyrious closed 6 years ago

waldyrious commented 6 years ago

686 had a flaw, in that if the script ran before the transifex dropdown had been instantiated, it would attempt to access a null element. This change should fix that.

See #687 for additional context. /cc @Ismael-VC and @ViralBShah.

ViralBShah commented 6 years ago

So, which ones to merge?

waldyrious commented 6 years ago

Perhaps @Ismael-VC can confirm whether the assertions I made on #687 are right. My guess is that swapping the ID doesn't solve the fundamental issue (and actually adds the link to the wrong place), but I could be missing something.

waldyrious commented 6 years ago

@ViralBShah sadly @Ismael-VC has given up on his patch and apparently on the i18n of Julia altogether. I'd suggest to merge this one and see if it works. We can always revert it if it doesn't.

waldyrious commented 6 years ago

Argh! It didn't work :( feel free to revert the commit, @ViralBShah, and in the meantime, I'd appreciate if you could ping someone who you believe might know how to correctly fix this. My experience with web development is pretty much limited to small experiments here and there.