Commit 39aafd0d authored by taco@waag.org's avatar taco@waag.org
Browse files

badge number (blue)

parent ff5514ad
......@@ -91,7 +91,19 @@ function handleValidationResults(msg, responses, keys, values, envelopes, tab_id
var args = {};
args[key2] = false;
browser.storage.local.set(args);
let fragmentCount = responses.length;
//console.log(fragmentCount);
if(fragmentCount > 0)
{
browser.browserAction.setBadgeText({text: fragmentCount.toString(), tabId: tab_id});
browser.browserAction.setBadgeBackgroundColor({color: "blue", tabId: tab_id});
browser.browserAction.onClicked.addListener((tab) => {
toggleProvenanceView(tab);
});
}
/*
if(valid){
browser.browserAction.setIcon({
tabId: tab_id, path: "icons/pop_certificate_valid-48.png"
......@@ -107,7 +119,7 @@ function handleValidationResults(msg, responses, keys, values, envelopes, tab_id
browser.browserAction.setIcon({
tabId: tab_id, path: "icons/pop_certificate_invalid-48.png"
});
}
}*/
}
//toggle provenance view for current tab
......
Supports Markdown
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