blob: a1b4d488efebf0f27198e4f52dfa46c0219b2b21 [file] [log] [blame]
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02001// This method is based on the fact that when building the extension for Firefox
2// the browser_specific_settings.gecko entry is included.
3export function isFirefox() {
4 var manifest = chrome.runtime.getManifest();
5 return manifest.browser_specific_settings !== undefined &&
6 manifest.browser_specific_settings.gecko !== undefined;
7}
8
9// Returns whether the extension is a release version.
10export function isReleaseVersion() {
11 var manifest = chrome.runtime.getManifest();
12 return ('version' in manifest) && manifest.version != '0';
13}