Microsoft has acquired GitHub. Decentraleyes has left GitHub. Welcome to its new home!

To participate, please register, or sign in with an existing GitLab.com, Bitbucket, or GitHub account.

Past contributions on GitHub? Be sure to reclaim your Comments, Issues, and Pull Requests.

Commit 9a65fe55 authored by Gokulakrishna's avatar Gokulakrishna

Show injected count in menu entry title in Firefox Android

parent a8550f5d
......@@ -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);
}
};
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