Created
July 14, 2017 08:03
-
-
Save fjaguero/8b86165f0f5ad838af46c6c698535bb7 to your computer and use it in GitHub Desktop.
Background
This file contains 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
// Listen to content.js events | |
chrome.extension.onMessage.addListener( | |
function(request, sender, sendResponse) { | |
if (request.count || request.count === 0) { | |
chrome.browserAction.setBadgeText({'text': request.count.toString()}) | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment