Hacker News new | ask | show | jobs
by quwert95 2224 days ago
These are great points. I'd like to add some more to them:

On minified source code, Extensions/Add-Ons are allowed to be deployed with minified source code as long as you provide the unminified versions to Google/Mozilla during review time.

On chrome vs. browser namespaces, a quick 'let chrome = browser;' can help you keep the diffs small between versions. I have yet to find a complete solution to fixing 'forked code' between Google/Mozilla Extensions/Add-Ons.

Also, storage mechanisms between browsers using the same extension code can be completely different. Beware if you're using caches, navigator.storage, and storage.local.

Finally, extensions don't consider themselves secure, depending on the browser. moz-extension:// is not considered secure for cache access, whereas chrome-extension:// is.

There lots of little 'gotchas' like these when developing browser extensions. :)

2 comments

> as long as you provide the unminified versions to Google/Mozilla during review time.

I'm curious how they could know that the source code is the same

Firefox asks you to provide the source and the instructions to get the same build you are submitting to the store.
They ask for the minification command that was used as well I believe.
> as long as you provide the unminified versions to Google/Mozilla during review time.

I have been publishing extensions for a while and never found Google asking me for the source code, is there any hidden option to submit it?

Another detail I have missed is release notes, Firefox is supposed to provide those but I have never been able to add them, Chrome doesn't seem to display them but I have got my submission rejected just after "improving" the description.

> On chrome vs. browser namespaces, a quick 'let chrome = browser;' can help you keep the diffs small between versions. I have yet to find a complete solution to fixing 'forked code' between Google/Mozilla Extensions/Add-Ons.

Firefox actually supports the chrome namespace but you need to be careful as some other APIs are different, for example, in Chrome the notifications has a richer set of options but you need to be careful to not use the ones not supported by Firefox.

Yeah, on the idea of improving a description when you haven’t updated the extension for a while. My extension also got a reject notice after sitting in the submission queue for a week just because I capitalized one letter in the app description.

I definitely wish I would have known that.