mirror of https://github.com/gorhill/uBlock.git
this fixes #912
This commit is contained in:
parent
98cf38d9e5
commit
7fbde83a28
|
@ -183,7 +183,7 @@ body.off #switch .fa {
|
|||
position: relative;
|
||||
}
|
||||
#extraTools > span > span.badge {
|
||||
color: #666;
|
||||
color: #222;
|
||||
bottom: 0;
|
||||
font: 10.5px sans-serif;
|
||||
position: absolute;
|
||||
|
|
|
@ -294,6 +294,7 @@ var popupDataFromTabId = function(tabId, tabTitle) {
|
|||
pageDomain: tabContext.rootDomain,
|
||||
pageAllowedRequestCount: 0,
|
||||
pageBlockedRequestCount: 0,
|
||||
popupBlockedCount: 0,
|
||||
tabId: tabId,
|
||||
tabTitle: tabTitle,
|
||||
tooltipsDisabled: µb.userSettings.tooltipsDisabled
|
||||
|
@ -313,6 +314,7 @@ var popupDataFromTabId = function(tabId, tabTitle) {
|
|||
r.noCosmeticFiltering = µb.hnSwitches.evaluateZ('no-cosmetic-filtering', tabContext.rootHostname);
|
||||
r.noRemoteFonts = µb.hnSwitches.evaluateZ('no-remote-fonts', tabContext.rootHostname);
|
||||
r.remoteFontCount = pageStore.remoteFontCount;
|
||||
r.popupBlockedCount = pageStore.popupBlockedCount;
|
||||
} else {
|
||||
r.hostnameDict = {};
|
||||
r.firewallRules = getFirewallRules();
|
||||
|
|
|
@ -304,6 +304,7 @@ PageStore.prototype.init = function(tabId) {
|
|||
this.perLoadAllowedRequestCount = 0;
|
||||
this.hiddenElementCount = ''; // Empty string means "unknown"
|
||||
this.remoteFontCount = 0;
|
||||
this.popupBlockedCount = 0;
|
||||
this.netFilteringCache = NetFilteringResultCache.factory();
|
||||
|
||||
// Support `elemhide` filter option. Called at this point so the required
|
||||
|
|
|
@ -463,6 +463,11 @@ var renderPopup = function() {
|
|||
uDom.nodeFromId('no-cosmetic-filtering').classList.toggle('on', popupData.noCosmeticFiltering === true);
|
||||
uDom.nodeFromId('no-remote-fonts').classList.toggle('on', popupData.noRemoteFonts === true);
|
||||
|
||||
// Report blocked popup count on badge
|
||||
total = popupData.popupBlockedCount;
|
||||
uDom.nodeFromSelector('#no-popups > span.badge')
|
||||
.textContent = total ? total.toLocaleString() : '';
|
||||
|
||||
// Report remote font count on badge
|
||||
total = popupData.remoteFontCount;
|
||||
uDom.nodeFromSelector('#no-remote-fonts > span.badge')
|
||||
|
|
|
@ -663,6 +663,7 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||
var pageStore = µb.pageStoreFromTabId(openerTabId);
|
||||
if ( pageStore ) {
|
||||
pageStore.logRequest(context, result);
|
||||
pageStore.popupBlockedCount += 1;
|
||||
}
|
||||
|
||||
// Blocked
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<h2 data-i18n="popupHitDomainCountPrompt"> </h2>
|
||||
<p class="statValue" id="popupHitDomainCount"> </p>
|
||||
<div id="extraTools">
|
||||
<span id="no-popups" class="hnSwitch fa" data-i18n-tip="popupTipNoPopups"><span></span></span>
|
||||
<span id="no-popups" class="hnSwitch fa" data-i18n-tip="popupTipNoPopups"><span class="badge"></span><span></span></span>
|
||||
<span id="no-strict-blocking" class="hnSwitch fa" data-i18n-tip="popupTipNoStrictBlocking"><span></span></span>
|
||||
<span id="no-cosmetic-filtering" class="hnSwitch fa" data-i18n-tip="popupTipNoCosmeticFiltering"><span class="badge"></span><span></span></span>
|
||||
<span id="no-remote-fonts" class="hnSwitch fa" data-i18n-tip="popupTipNoRemoteFonts"><span class="badge"></span><span></span></span>
|
||||
|
|
Loading…
Reference in New Issue