Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Desktop] Create a WordPress plugin to install Brave #10912

Open
vporton opened this issue Jul 24, 2020 · 2 comments
Open

[Desktop] Create a WordPress plugin to install Brave #10912

vporton opened this issue Jul 24, 2020 · 2 comments

Comments

@vporton
Copy link

vporton commented Jul 24, 2020

Please create a WordPress plugin that recommends to install Brave if browsed not with Brave. The plugin should be configurable to add an affiliate link.

@AveryMainstone
Copy link

I don't think this would work as when websites check what browser is being used Brave shows as:
"Chrome 87" for example.
Source: https://www.whatsmybrowser.org/

And web browser identifier shows as:
"Chrome 87.0.4280.101"
Source: http://www.supportdetails.net/

And the user agent shows as something like this:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Safari/537.36"
Source: http://www.supportdetails.net/

So not sure if this would be possible due to how brave shows itself to websites and services unless i'm missing another identifier for the browser which websites can detect then I don't think this is possible.

@patricklocke
Copy link

So not sure if this would be possible due to how brave shows itself to websites and services unless i'm missing another identifier for the browser which websites can detect then I don't think this is possible.

Might be more feasible to "duck-type" it rather than just use strict user agent identification. In looking around the window object, there's window.clientInformation.brave which includes the method "isBrave", which returns a boolean as a promise. I can confirm it's returning true on random pages within the Brave browser. Idk if it's redundant, since window.clientInformation.brave is undefined in other browsers, but at first glance it appears to be a solution to the userAgent issue from above.

I'm rubbish with WP, so I dont think I'm the right person to create this plugin, but it should be possible to do so (assuming the Brave dev team continues supporting the isBrave() method, ofc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants