Skip to content
Snippets Groups Projects
Commit 59efc7f9 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Merge branch 'master' into 'master'

Display injection counts in mobile menu entry titles

See merge request !288
parents a8550f5d 9a65fe55
No related branches found
No related tags found
1 merge request!288Display injection counts in menu entry titles
......@@ -44,6 +44,14 @@ stateManager.registerInjection = function (tabIdentifier, injection) {
}
}
if (injectionCount > 0) {
let title = 'Decentraleyes (' + injectionCount.toString() + ')';
wrappers.setTitle({
'title': title,
'tabId': tabIdentifier
});
}
if (isNaN(interceptor.amountInjected)) {
chrome.storage.local.get(Setting.AMOUNT_INJECTED, function (items) {
......
......@@ -36,3 +36,13 @@ wrappers.setBadgeText = function (details) {
chrome.browserAction.setBadgeText(details);
}
};
// In firefox android, browser action shows as a menu entry instead of icon.
// Use the below 'setTitle' to show injected count in menu entry.
wrappers.setTitle = function (details){
if (chrome.browserAction.setTitle !== undefined) {
chrome.browserAction.setTitle(details);
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment