Created
August 14, 2019 05:45
-
-
Save miguelmota/d59972f6d80bcce31689dc2b8f40c831 to your computer and use it in GitHub Desktop.
JavaScript check if browser is Brave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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