Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created August 14, 2019 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/d59972f6d80bcce31689dc2b8f40c831 to your computer and use it in GitHub Desktop.
Save miguelmota/d59972f6d80bcce31689dc2b8f40c831 to your computer and use it in GitHub Desktop.
JavaScript check if browser is Brave
const res = await (await fetch('https://api.duckduckgo.com/?q=useragent&format=json')).json()
const isBrave = res.Answer.includes('Brave')
console.log(isBrave)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment