mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 02:42:41 +01:00
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/12
|
||||
this.blockedRequests[url] = µb.userSettings.logBlockedRequests ?
|
||||
type + '\t' + reason :
|
||||
true;
|
||||
|
||||
// No need to record blocked requests which are not image or frame, as
|
||||
// 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
Block a user