Skip to content

Instantly share code, notes, and snippets.

@jessuni

jessuni/background.js

Last active Aug 24, 2020
Embed
What would you like to do?
extension-section-1-background-1
function disableIcon(tabId) {
chrome.browserAction.setIcon({
tabId: tabId,
path: {
'16': '/images/icon16-gray.png',
'32': '/images/icon32-gray.png',
},
})
chrome.browserAction.setPopup({
tabId,
popup: '',
})
}
function enableIcon(tabId) {
chrome.browserAction.setIcon({
tabId: tabId,
path: {
'16': '/images/icon16.png',
'32': '/images/icon32.png',
},
})
chrome.browserAction.setPopup({
tabId,
popup: 'popup.html',
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.