Adrià Vilanova MartÃnez | 3465e77 | 2021-07-11 19:18:41 +0200 | [diff] [blame] | 1 | // This method is based on the fact that when building the extension for Firefox |
| 2 | // the browser_specific_settings.gecko entry is included. |
| 3 | export 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. |
| 10 | export function isReleaseVersion() { |
| 11 | var manifest = chrome.runtime.getManifest(); |
| 12 | return ('version' in manifest) && manifest.version != '0'; |
| 13 | } |