-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add compatibility with most browsers supporting WebExtension #1
Conversation
* Use browser-polyfill.js (https://github.com/mozilla/webextension-polyfill) * For auth, send extension URL instead of extension ID to support schemes like `moz-extension://` * Fix manifest errors (wrong logo sizes for 16px and 48px) * Optimize PNGs using `pngquant` * Remove `.DS_Store` files * Some code style fixes applied by prettier (I have format on save enabled and I noticed too late)
Hi @alin23 Much needed patch. Thank you for taking the time to contribute back. Best, |
To help with the review this is an outline of the code changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alin23,
Thanks for the PR. See if you can commit the minor fix I've suggested.
passport.authenticate('google', { failureRedirect: '/login' }), | ||
function(req, res) { | ||
const redirect = req.session.returnTo; | ||
delete req.session.returnTo; | ||
|
||
if (req.session.from_extension) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter name change from_extension
to from_extension_url
might break the app if the server update and extension update doesn't happen at the same time – which is hard to ensure, given that the extension update is in the browser's control.
Can you edit the patch to exclude these param change alone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the server handles both cases, would it be hard to ensure the server is updated first?
I think you could deploy the server first, which would still be compatible with the current version of the extension, and then you can publish the extension on the web store.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense. I didn't notice you've preserved the old handling as well. That should do 👍
Neat & timely! Merged now. |
moz-extension://
pngquant
.DS_Store
filesTested on latest Chrome Canary and Firefox Developer Edition