Skip to content

Commit

Permalink
feat: add brave detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed May 25, 2024
1 parent 7069015 commit 2af7be6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/background/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export function emitNotification(title: string, message: string) {
})
}

// FIXME: Detect Brave? Using navigator.brave.isBrave does not work in a service worker
// so this would need to be done in an injected script
// FIXME: Detect Vivaldi? It seems to be intentionally impossible
export const getBrowserName = () => {
if (
if ((navigator as any).brave.isBrave()) {
return 'brave'
} else if (
navigator.userAgent.includes('Opera') ||
navigator.userAgent.includes('OPR')
) {
Expand Down

0 comments on commit 2af7be6

Please sign in to comment.