Skip to content

Commit

Permalink
fix: add a brave-specific check (ActivityWatch#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
BelKed authored May 20, 2024
1 parent 94b5312 commit 0c27861
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ function logHttpError(error) {
}

function getBrowserName() {
if (navigator.brave?.isBrave())
return "brave";

// Get browser name from UAParser (somewhat expensive operation)
var agent_parsed = ua_parser(navigator.userAgent);
var browserName = agent_parsed.browser.name.toLowerCase();
Expand Down

0 comments on commit 0c27861

Please sign in to comment.