fix browser detection for install instructions#20
Conversation
Chrome added a `browser` namespace (https://developer.chrome.com/docs/extensions/develop/concepts/browser-namespace) so `go run ... --install=...` instructions provided to the end user were specific to Firefox and didn't work for Chrome. Signed-off-by: Cameron Stokes <cameron@tailscale.com>
0ed38b8 to
abebf6f
Compare
|
I don't understand the problem. You talk about "go run" giving bad instructions, but "go run" doesn't use this JavaScript code you're modifying. Also, we have two copies of the browserByte stuff stuff already, one in Chrome and one in Firefox: And you only modified one of them. The original intention, IIRC, was for background.js to be used by both, but then it was forked instead, so at that point there's no reason for that function to even exist, really. Chrome can just return (or use "C") and Firefox can use "F" always, without any detection. /cc @Erisa |
Apologies for the poor explanation. The browser extension provides the
Yup, I missed updating the Firefox one, though it's working as-is anyway. I don't know what it would look like to unfork the code and have shared code between the browser implementations, so maybe it's simplest to just hardcode |
Chrome added a
browsernamespace (https://developer.chrome.com/docs/extensions/develop/concepts/browser-namespace) sogo run ... --install=...instructions provided to the end user were specific to Firefox and didn't work for Chrome.