I have been messing around with the Brave browser (https://www.brave.com/), an I cannot figure out how to determine how if a user is using Brave. I used a simp
Kohjah Breese's solution isn't working to detect Brave on Android (e.g. Chrome is detected as Brave). But as he said "If you search DuckDuckGo for [what's my user agent] they will return Brave." Then you can use the API of Duckduckgo to know if they browser is Brave :
var request = new XMLHttpRequest()
request.open('GET', 'https://api.duckduckgo.com/?q=useragent&format=json', true)
request.onload = function () {
var data = JSON.parse(this.response)
var isBrave = data['Answer'].includes('Brave');
if(isBrave){
console.log( isBrave );
}
}
request.send()