aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/js/logger-ui.js7
-rw-r--r--src/js/logger.js3
-rw-r--r--src/js/tab.js1
-rw-r--r--src/js/traffic.js65
4 files changed, 69 insertions, 7 deletions
diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js
index ff661a5..124a46d 100644
--- a/src/js/logger-ui.js
+++ b/src/js/logger-ui.js
@@ -181,6 +181,7 @@ var createCellAt = function(tr, index) {
}
if ( td ) {
td.removeAttribute('colspan');
+ td.removeAttribute('title');
td.textContent = '';
} else {
td = document.createElement('td');
@@ -299,7 +300,11 @@ var renderNetLogEntry = function(tr, entry) {
}
tr.cells[4].textContent = (prettyRequestTypes[type] || type);
- tr.cells[5].appendChild(nodeFromURL(url, filter));
+ td = tr.cells[5];
+ td.appendChild(nodeFromURL(url, filter));
+ if ( entry.d4 ) {
+ td.setAttribute('title', entry.d4);
+ }
};
/******************************************************************************/
diff --git a/src/js/logger.js b/src/js/logger.js
index 91bc04f..1a46923 100644
--- a/src/js/logger.js
+++ b/src/js/logger.js
@@ -58,6 +58,7 @@ LogEntry.prototype.init = function(args) {
this.d1 = args[3];
this.d2 = args[4];
this.d3 = args[5];
+ this.d4 = args[6];
return this;
};
@@ -66,7 +67,7 @@ LogEntry.prototype.init = function(args) {
LogEntry.prototype.dispose = function() {
this.tstamp = 0;
this.tab = this.cat = '';
- this.d0 = this.d1 = this.d2 = this.d3 = undefined;
+ this.d0 = this.d1 = this.d2 = this.d3 = this.d4 = undefined;
if ( logEntryJunkyard.length < logEntryJunkyardMax ) {
logEntryJunkyard.push(this);
}
diff --git a/src/js/tab.js b/src/js/tab.js
index b095d26..6560d44 100644
--- a/src/js/tab.js
+++ b/src/js/tab.js
@@ -513,6 +513,7 @@ vAPI.tabs.onPopup = function(details) {
result,
'popup',
targetURL,
+ openerHostname,
openerHostname
);
diff --git a/src/js/traffic.js b/src/js/traffic.js
index 4293c35..340c101 100644
--- a/src/js/traffic.js
+++ b/src/js/traffic.js
@@ -92,7 +92,18 @@ var onBeforeRequest = function(details) {
// Possible outcomes: blocked, allowed-passthru, allowed-mirror
pageStore.logRequest(requestContext, result);
- µb.logger.writeOne(tabId, 'net', result, requestType, requestURL, requestContext.rootHostname);
+
+ if ( µb.logger.isEnabled() ) {
+ µb.logger.writeOne(
+ tabId,
+ 'net',
+ result,
+ requestType,
+ requestURL,
+ requestContext.rootHostname,
+ requestContext.pageHostname
+ );
+ }
// Not blocked
if ( µb.isAllowResult(result) ) {
@@ -187,7 +198,18 @@ var onBeforeRootFrameRequest = function(details) {
if ( pageStore ) {
pageStore.logRequest(context, result);
}
- µb.logger.writeOne(tabId, 'net', result, 'main_frame', requestURL, context.rootHostname);
+
+ if ( µb.logger.isEnabled() ) {
+ µb.logger.writeOne(
+ tabId,
+ 'net',
+ result,
+ 'main_frame',
+ requestURL,
+ requestHostname,
+ requestHostname
+ );
+ }
// Not blocked
if ( µb.isAllowResult(result) ) {
@@ -279,7 +301,18 @@ var onBeforeBehindTheSceneRequest = function(details) {
}
pageStore.logRequest(context, result);
- µb.logger.writeOne(vAPI.noTabId, 'net', result, details.type, details.url, context.rootHostname);
+
+ if ( µb.logger.isEnabled() ) {
+ µb.logger.writeOne(
+ vAPI.noTabId,
+ 'net',
+ result,
+ details.type,
+ details.url,
+ context.rootHostname,
+ context.rootHostname
+ );
+ }
// Not blocked
if ( µb.isAllowResult(result) ) {
@@ -328,7 +361,18 @@ var onHeadersReceived = function(details) {
var result = pageStore.filterRequestNoCache(context);
pageStore.logRequest(context, result);
- µb.logger.writeOne(tabId, 'net', result, 'inline-script', details.url, context.rootHostname);
+
+ if ( µb.logger.isEnabled() ) {
+ µb.logger.writeOne(
+ tabId,
+ 'net',
+ result,
+ 'inline-script',
+ details.url,
+ context.rootHostname,
+ context.pageHostname
+ );
+ }
// Don't block
if ( µb.isAllowResult(result) ) {
@@ -368,7 +412,18 @@ var onRootFrameHeadersReceived = function(details) {
var result = pageStore.filterRequestNoCache(context);
pageStore.logRequest(context, result);
- µb.logger.writeOne(tabId, 'net', result, 'inline-script', details.url, context.rootHostname);
+
+ if ( µb.logger.isEnabled() ) {
+ µb.logger.writeOne(
+ tabId,
+ 'net',
+ result,
+ 'inline-script',
+ details.url,
+ context.rootHostname,
+ context.pageHostname
+ );
+ }
// Don't block
if ( µb.isAllowResult(result) ) {