Microsoft is acquiring GitHub. Decentraleyes is leaving 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 59efc7f9 authored by Thomas Rientjes's avatar Thomas Rientjes

Merge branch 'master' into 'master'

Display injection counts in mobile menu entry titles

See merge request Synzvato/decentraleyes!288
parents a8550f5d 9a65fe55
......@@ -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