Skip to content

Conversation

@ACTCD
Copy link
Collaborator

@ACTCD ACTCD commented Jun 28, 2025

Before:
dark
old
After:
new

@ACTCD ACTCD requested a review from Copilot June 28, 2025 23:10
Copy link

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 PR adds support for light and dark theme colors in console logs by introducing a helper and updating existing log statements.

  • Introduce getColor utility to abstract theme-aware CSS colors.
  • Replace hardcoded color strings in console logs with calls to getColor.
  • Import the new utility in the userscripts entry point.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/shared/colors.js New getColor function providing theme-based CSS color strings.
src/ext/content-scripts/entry-userscripts.js Updated console log calls to use getColor instead of literals.
Comments suppressed due to low confidence (2)

src/shared/colors.js:1

  • The JSDoc for getColor is missing a @returns {string} annotation; adding it will improve IDE support and clarity.
/**

src/ext/content-scripts/entry-userscripts.js:66

  • These new getColor-based console statements should be covered by existing or new unit tests to verify correct CSS strings under both light and dark schemes.
		console.info(`Injecting: ${name} %c(js/${world})`, getColor("yellow"));

@ACTCD ACTCD merged commit dad2e68 into main Jun 28, 2025
1 check passed
@ACTCD ACTCD deleted the fix-console-log-theme-color branch June 28, 2025 23:42
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.

2 participants