bunsenbrowser / bunsen

🔥 Bunsen Browser provides easy to use offline P2P application and file distribution that is verifiable on Android devices. https://bunsenbrowser.github.io/
117 stars 7 forks source link

How to detect bunsen #34

Closed tiagoantao closed 6 years ago

tiagoantao commented 6 years ago

I have a small library to detect dat browsers: https://github.com/tiagoantao/dat_detector (so that dat-specific content can be served or client side code can interact with dat)

Currently it supports Beaker, and I would like to support Bunsen as well. But the problem is that I have no way to test this.

For example with Beaker I just need to see if BeakerBrowser is passed as the User-Agent on the server side. On the client side i check for window.DatArchive

I am wondering if there is a similar way to detect Bunsen?

chrisekelley commented 6 years ago

Hey, this is a cool idea! I just pushed a big refactor to master that gives us broader device support and intents, so if the user clicks a link to a dat site (dat:// scheme) Bunsen should open it.

I'll see if we can add BunsenBrowser to out User-Agent.

chrisekelley commented 6 years ago

I'm adding the following to config.xml to append "BunsenBrowser" to the User-Agent string and enable detection of Bunsen"

    <preference name="AppendUserAgent" value="BunsenBrowser" />

I've got some UI changes to make now; I'll push this out later in the day and close this issue after testing.

Thanks for the good idea!

chrisekelley commented 6 years ago

This should now be active in all new releases. I'm closing this issue; however, please re-open if it doesn't work for you.