mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-13 02:14:17 +01:00
this fixes #1171
This commit is contained in:
parent
c15f693129
commit
91c2763259
4 changed files with 18 additions and 2 deletions
|
@ -154,7 +154,7 @@ body.colorBlind #netInspector tr.nooped {
|
||||||
body.colorBlind #netInspector tr.allowed {
|
body.colorBlind #netInspector tr.allowed {
|
||||||
background-color: rgba(255, 194, 57, 0.1)
|
background-color: rgba(255, 194, 57, 0.1)
|
||||||
}
|
}
|
||||||
#netInspector tr.cb {
|
#netInspector tr.cb, #netInspector tr.rr {
|
||||||
background-color: rgba(255, 255, 0, 0.1);
|
background-color: rgba(255, 255, 0, 0.1);
|
||||||
}
|
}
|
||||||
#netInspector tr.maindoc {
|
#netInspector tr.maindoc {
|
||||||
|
@ -219,6 +219,9 @@ body:not(.popupOn) #netInspector tr.canMtx td:nth-of-type(2):hover {
|
||||||
#netInspector tr.canLookup td:nth-of-type(3) {
|
#netInspector tr.canLookup td:nth-of-type(3) {
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
}
|
}
|
||||||
|
#netInspector tr.cat_redirect td:nth-of-type(3):before {
|
||||||
|
content: '\21d2 ';
|
||||||
|
}
|
||||||
#netInspector tr.cat_net td:nth-of-type(4),
|
#netInspector tr.cat_net td:nth-of-type(4),
|
||||||
#netInspector tr.cat_cosmetic td:nth-of-type(4) {
|
#netInspector tr.cat_cosmetic td:nth-of-type(4) {
|
||||||
font: 12px monospace;
|
font: 12px monospace;
|
||||||
|
|
|
@ -517,6 +517,7 @@ var renderLogEntry = function(entry) {
|
||||||
|
|
||||||
case 'cosmetic':
|
case 'cosmetic':
|
||||||
case 'net':
|
case 'net':
|
||||||
|
case 'redirect':
|
||||||
tr = createRow('1111');
|
tr = createRow('1111');
|
||||||
renderNetLogEntry(tr, entry);
|
renderNetLogEntry(tr, entry);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -96,6 +96,7 @@ RedirectEntry.fromSelfie = function(selfie) {
|
||||||
var RedirectEngine = function() {
|
var RedirectEngine = function() {
|
||||||
this.resources = Object.create(null);
|
this.resources = Object.create(null);
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.resourceNameRegister = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -131,7 +132,7 @@ RedirectEngine.prototype.lookup = function(context) {
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
entry = entries[i];
|
entry = entries[i];
|
||||||
if ( entry.c.test(reqURL) ) {
|
if ( entry.c.test(reqURL) ) {
|
||||||
return entry.r;
|
return (this.resourceNameRegister = entry.r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,17 @@ var onBeforeRequest = function(details) {
|
||||||
// Redirect blocked request?
|
// Redirect blocked request?
|
||||||
var url = µb.redirectEngine.toURL(requestContext);
|
var url = µb.redirectEngine.toURL(requestContext);
|
||||||
if ( url !== undefined ) {
|
if ( url !== undefined ) {
|
||||||
|
if ( µb.logger.isEnabled() ) {
|
||||||
|
µb.logger.writeOne(
|
||||||
|
tabId,
|
||||||
|
'redirect',
|
||||||
|
'rr:' + µb.redirectEngine.resourceNameRegister,
|
||||||
|
'redirect',
|
||||||
|
requestURL,
|
||||||
|
requestContext.rootHostname,
|
||||||
|
requestContext.pageHostname
|
||||||
|
);
|
||||||
|
}
|
||||||
return { redirectUrl: url };
|
return { redirectUrl: url };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue