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
Post a Comment