Skip to content

Conversation

@shahar1
Copy link
Contributor

@shahar1 shahar1 commented Jan 3, 2026

Copilot Summary

This pull request simplifies the initialization logic for the dark mode functionality in dark-mode.js by removing the init function and its associated event listener. The code now executes immediately without waiting for the DOM to be ready.

Dark mode initialization simplification:

  • Removed the init function and the conditional logic that waited for the DOM to load, allowing the dark mode setup code to run immediately when the script is loaded. [1] [2]

@shahar1 shahar1 changed the title Fix dark button #2 Fix dark mode button on production #2 Jan 3, 2026
@shahar1 shahar1 requested a review from Copilot January 3, 2026 18:08
@shahar1 shahar1 merged commit d1749cf into main Jan 3, 2026
8 checks passed
@shahar1 shahar1 deleted the fix-button-2 branch January 3, 2026 18:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request attempts to simplify the dark mode initialization in dark-mode.js by removing the conditional logic that ensured DOM readiness before executing the setup code.

Key Changes:

  • Removed the init function wrapper and DOM ready state checking logic
  • Changed the dark mode setup code to execute immediately when the script loads instead of waiting for DOMContentLoaded event when necessary

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

shahar1 added a commit that referenced this pull request Jan 3, 2026
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.

1 participant