From 8eaa92f0a2152a88bd8f11c12f875e21e24d4166 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 22 Dec 2014 18:38:18 -0500 Subject: [PATCH] for debugging purpose when investigating --- src/js/traffic.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index d906d4e20..72d7f59fb 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -93,6 +93,8 @@ var onBeforeRequest = function(details) { // Not blocked if ( pageStore.boolFromResult(result) === false ) { + //console.debug('onBeforeRequest()> ALLOW "%s" (%o) because "%s"', details.url, details, result); + pageStore.perLoadAllowedRequestCount++; µb.localSettings.allowedRequestCount++; @@ -128,6 +130,8 @@ var onBeforeRequest = function(details) { } // Blocked + //console.debug('onBeforeRequest()> BLOCK "%s" (%o) because "%s"', details.url, details, result); + pageStore.perLoadBlockedRequestCount++; µb.localSettings.blockedRequestCount++; µb.updateBadgeAsync(tabId); @@ -136,7 +140,6 @@ var onBeforeRequest = function(details) { // Do not use redirection, we need to block outright to be sure the request // will not be made. There can be no such guarantee with redirection. - // console.debug('µBlock> onBeforeRequest()> BLOCK "%s" (%o) because "%s"', details.url, details, result); return { 'cancel': true }; }; @@ -149,6 +152,7 @@ var onBeforeSendHeaders = function(details) { // the tab id could be -1, despite the request not really being a // behind-the-scene request. If true, the test below would prevent // the popup blocker from working. Need to check this. + //console.debug('onBeforeSendHeaders()> "%s" (%o) because "%s"', details.url, details, result); // Do not block behind the scene requests. var tabId = details.tabId;