mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
context provided in title attr of URL in logger (until I figure a better way)
This commit is contained in:
parent
4528122268
commit
53a78ceb39
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -513,6 +513,7 @@ vAPI.tabs.onPopup = function(details) {
|
||||
result,
|
||||
'popup',
|
||||
targetURL,
|
||||
openerHostname,
|
||||
openerHostname
|
||||
);
|
||||
|
||||
|
@ -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) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user