Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lang: Load scripts after theUILang has loaded #2545

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

TrimmingFool
Copy link
Contributor

@stickz #2543 (comment) Yeah, it seems, this not working for Safari.

Scripts which depend on theUILang must be executed after theUILang has loaded.
Unfortunately, in order to fix #2543, the time the browser fetches these scripts is now also delayed.
Preferably, scripts should not depend on theUILang during startup.

Fixes #2543

I did not test this with Safari but with Firefox, Chromium and Epiphany.

Scripts which depend on theUILang must be executed after theUILang has
loaded. Unfortunately, in order to fix Novik#2543, the time the browser
fetches these scripts is now also delayed.
Preferably, scripts should not depend on theUILang during startup.

Fixes Novik#2543
@stickz
Copy link
Collaborator

stickz commented Aug 8, 2023

@TrimmingFool Is there a simpler solution here? This looks like a CSS pseudoclass issue with Safari. It might be possible to do a one liner solution here with jQuery. https://stackoverflow.com/questions/1293369/using-the-last-child-selector

For instance: $("#head script:last-child") so we rely on jQuery instead of the web browser.

@stickz
Copy link
Collaborator

stickz commented Aug 8, 2023

@TrimmingFool Nevermind, I tested alternative solutions with no success. I'll merge this PR. Thanks!

@stickz stickz merged commit 31fe4b7 into Novik:v4.2 Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants