Commit f22d44fa authored by Laurent Wouters's avatar Laurent Wouters
Browse files

Transform into a web extension

parent 6c4152a85ccb
......@@ -3,7 +3,8 @@ var allTabs = {};
function getTabData(id) {
if (!allTabs.hasOwnProperty(id)) {
allTabs[id] = {
isActive: false
isActive: false,
hasData: ""
};
}
return allTabs[id];
......@@ -19,6 +20,14 @@ function updateIcon(tabId) {
},
tabId: tabId
});
chrome.browserAction.setBadgeBackgroundColor({
color: [217, 0, 0, 255],
tabId: tabId
});
chrome.browserAction.setBadgeText({
text: data.hasData,
tabId: tabId
});
}
function toggleActive(tab) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment