mirror of https://github.com/gorhill/uBlock.git
do not use memory which is not needed
This commit is contained in:
parent
0e0fb8057f
commit
891ec7fc26
|
@ -112,9 +112,16 @@ PageStore.prototype.recordRequest = function(type, url, reason) {
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/7
|
// https://github.com/gorhill/uBlock/issues/7
|
||||||
// https://github.com/gorhill/uBlock/issues/12
|
// https://github.com/gorhill/uBlock/issues/12
|
||||||
this.blockedRequests[url] = µb.userSettings.logBlockedRequests ?
|
|
||||||
type + '\t' + reason :
|
// No need to record blocked requests which are not image or frame, as
|
||||||
true;
|
// these are the only ones we try to hide when they are blocked.
|
||||||
|
if ( µb.userSettings.logBlockedRequests === false ) {
|
||||||
|
if ( type === 'image' || type === 'sub_frame' ) {
|
||||||
|
this.blockedRequests[url] = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.blockedRequests[url] = type + '\t' + reason;
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue