firefox webextensions - How to know whether a chrome extension is downloaded from store? -


i develop chrome extension compatible firefox/edge/opera.

the extension rely on rest api accessible on web. during web development, prefer pointing development endpoint not affect production tenant , affect development instance , database.

my question quite simple, make similar pseudo-code:

if (extension.downloaded_from_store == true)     endpoint = "https://api-dev.example.com" else     // extension has been installed local directory     endpoint = "https://api-prod.example.com" 

do have idea how such thing (preferably background.js page) ?

if solution can compatible browsers, perfect !

most google chrome extensions on store have permanent extension id. if packaged extension uses same extension id each update can hardcode id , check inside first if.

i recommend reading more packaging chrome extensions here.

specifically this part.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -