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