Development settings for web extensions

Martin Giger martin at humanoids.be
Fri Oct 13 15:55:35 UTC 2017


Hi Mike

onInstalled tells you if an installation is temporary:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/onInstalled

Martin


On 13.10.2017 17:38, Mike Lissner wrote:
> Is there a way from within an extension to know if it's being run by
> web-ext or to know if it was installed locally (as opposed to via AMO?)
>
> On Thu, Oct 12, 2017 at 11:42 PM Damien Cassou <damien at cassou.me
> <mailto:damien at cassou.me>> wrote:
>
>     Mike Lissner <mike at free.law> writes:
>     > I'm trying to have different variables for my extension during
>     development
>     > so that during dev I can be sure not to hit the live server.
>
>
>     what about having 2 manifest.json with a different value for
>     applications/gecko/id?  One id would be for users, one would be for
>     developers.
>     https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/applications
>
>     On the JS side, you can check the id with
>     browser.runtime.id <http://browser.runtime.id>.
>     https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/id
>
>     Best,
>
>     --
>     Damien Cassou
>     http://damiencassou.seasidehosting.st
>
>     "Success is the ability to go from one failure to another without
>     losing enthusiasm." --Winston Churchill
>
> -- 
> Mike Lissner
> Executive Director
> Free Law Project
> @freelawproject
> https://free.law/donate/
>
>
> _______________________________________________
> Dev-addons mailing list
> Dev-addons at mozilla.org
> https://mail.mozilla.org/listinfo/dev-addons

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171013/42c45096/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171013/42c45096/attachment-0001.sig>


More information about the Dev-addons mailing list