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

Fix scripts running when they should not #217

Merged
merged 2 commits into from
May 4, 2024

Conversation

Pyrofab
Copy link
Member

@Pyrofab Pyrofab commented May 4, 2024

For the Swagger UI I used a dynamic import so the script gets split into its own chunk, and only gets loaded on the relevant page.
For the installer version, the imported module is really small so a dynamic import was not needed. As for the "condition", I noticed the Astro doc was suggesting web components to implement custom behaviour, and I figured it would do a decent job at structuring the code, so I used this instead of a basic getElementById.

fixes #215
fixes #216


See preview on Cloudflare Pages: https://preview-217.quiltmc-org.pages.dev

Copy link
Contributor

@UpcraftLP UpcraftLP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good at a cursory glance, can't really do more rn.

@ix0rai ix0rai added the bug Something isn't working label May 4, 2024
@Pyrofab Pyrofab merged commit 08ed1e4 into QuiltMC:main May 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants