Skip to content

Conversation

@Ayush1519
Copy link

This PR simplifies the theme-switching logic by:

  • Wrapping the script inside a DOMContentLoaded event
  • Using a boolean flag (useDark) for readability
  • Replacing verbose if...else with classList.toggle() for clarity

Improves maintainability, reduces repetition, and ensures reliable DOM access timing.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@deeleeramone
Copy link
Contributor

Hi, thanks for the PR.

Can you tell me how you have tested this code and under what conditions? Which DOM execution are you referring to, specifically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants