Created
May 16, 2017 14:28
-
-
Save groovecoder/78d1efd76e2e03bebe60982cb9155e81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function checkExtensionInfo() { | |
| const manifestPath = browser.extension.getURL("manifest.json"); | |
| const response = await fetch(manifestPath); | |
| console.log('response.json(): ', response.json()); | |
| const extensionInfo = response.json(); | |
| if (MAJOR_VERSIONS.indexOf(extensionInfo.version) > -1) { | |
| browser.browserAction.setBadgeBackgroundColor({color: "rgba(0,217,0,255)"}); | |
| browser.browserAction.setBadgeText({text: "NEW"}); | |
| } | |
| } | |
| checkExtensionInfo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment