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

Fixed the theme loader as to work when <head> isn't yet created #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Maix0
Copy link

@Maix0 Maix0 commented Feb 17, 2024

This small pull request fixes the theme loader so it waits until the window fires the event DOMContentLoaded
It also makes it so the two <link> elements are now refered to with an id (using the improved_intra__<NAME> as to never conflict with other ids). This allows the use of a "getter" and to only create the element if it doesn't exist.
the next step should be to unconditionally create such elements, and just remove the href element (or maybe point to an empty css file ?)
This would allow it to not dance around creating new elements and remove the if needed.

This pull request also include a very minor change to build.sh (chaning the shbang to /usr/bin/env bash as to work on my nixos machine.) This should have no effect whatsoever for other distribution.

@FreekBes FreekBes added the refactor Improvement to the codebase label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvement to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants