Skip to content
Snippets Groups Projects
Commit 9a65fe55 authored by Gokulakrishna's avatar Gokulakrishna
Browse files

Show injected count in menu entry title in Firefox Android

parent a8550f5d
Branches pale-moon
No related tags found
No related merge requests found
......@@ -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