1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-02 00:42:45 +01:00

need to maybe skip type after transposition

This commit is contained in:
gorhill 2015-01-07 20:42:19 -05:00
parent ae2eb25e25
commit bdf770a1bb

View File

@ -38,13 +38,11 @@ var Matrix = function() {
/******************************************************************************/
var supportedTypes = {
var supportedDynamicTypes = {
'*': true,
'inline-script': true,
'script': true,
'1p-script': true,
'3p-script': true,
'sub_frame': true,
'3p-frame': true,
'image': true
};
@ -261,11 +259,6 @@ Matrix.prototype.evaluateCellZY = function(srcHostname, desHostname, type) {
}
// Any destination + specific-type
if ( supportedTypes.hasOwnProperty(type) === false ) {
this.type = '';
return this;
}
this.y = '*';
if ( type === 'script' ) {
@ -274,6 +267,12 @@ Matrix.prototype.evaluateCellZY = function(srcHostname, desHostname, type) {
type = '3p-frame';
}
// Is this a type suitable for dynamic filtering purpose?
if ( supportedDynamicTypes.hasOwnProperty(type) === false ) {
this.type = '';
return this;
}
this.type = type;
this.r = this.evaluateCellZ(srcHostname, '*', type);