Skip to content

Conversation

@BelKed
Copy link
Contributor

@BelKed BelKed commented May 20, 2024

Use the Brave specific API to check if the browser is Brave.
Manually tested, works on my machine :)



🚀 This description was created by Ellipsis for commit 39bb78f

Summary:

This PR optimizes browser detection by adding a Brave-specific check in the getBrowserName function of src/client.js, improving performance by avoiding unnecessary operations.

Key points:

  • Adds Brave browser check using navigator.brave?.isBrave() in getBrowserName function in src/client.js.
  • Returns 'brave' immediately if the browser is Brave, before using UAParser.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot 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 to me! Reviewed everything up to 39bb78f in 47 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src/client.js:26
  • Draft comment:
    It's crucial to ensure that new features like the Brave browser check are thoroughly tested across various environments, not just manually on a single machine. Consider implementing automated tests to verify the behavior across different scenarios.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_bqQ5OuxbUTQq9lMM


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

5 hours left in your free trial, upgrade for $20/seat/month or contact us.

@ErikBjare ErikBjare merged commit 945ace9 into ActivityWatch:master May 20, 2024
@ErikBjare
Copy link
Member

Nice, thanks!

powellnorma pushed a commit to powellnorma/aw-watcher-web that referenced this pull request Oct 3, 2024
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.

'Top Browser Domains' not working on Brave

2 participants