From 8dd21c5f49da16c917dc67b9390ebf97ab45ed43 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 27 Jul 2015 09:20:47 -0400 Subject: [PATCH] change of mind: removing 3p-passive because redundancy, better to work on doc --- src/js/dynamic-net-filtering.js | 10 +++------- src/js/messaging.js | 2 -- src/js/popup.js | 2 +- src/popup.html | 1 - 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/js/dynamic-net-filtering.js b/src/js/dynamic-net-filtering.js index 069045cdece6c..319e19134f058 100644 --- a/src/js/dynamic-net-filtering.js +++ b/src/js/dynamic-net-filtering.js @@ -46,8 +46,7 @@ var supportedDynamicTypes = { 'inline-script': true, '1p-script': true, '3p-script': true, - '3p-frame': true, - '3p-passive': true + '3p-frame': true }; var typeBitOffsets = { @@ -57,8 +56,7 @@ var typeBitOffsets = { '3p-script': 6, '3p-frame': 8, 'image': 10, - '3p': 12, - '3p-passive': 14 + '3p': 12 }; var actionToNameMap = { @@ -388,9 +386,7 @@ Matrix.prototype.evaluateCellZY = function(srcHostname, desHostname, type) { // Specific party if ( thirdParty ) { // 3rd-party, specific type - if ( type === 'image' || type === 'stylesheet' ) { - if ( this.evaluateCellZ(srcHostname, '*', '3p-passive') !== 0 ) { return this; } - } else if ( type === 'script' ) { + if ( type === 'script' ) { if ( this.evaluateCellZ(srcHostname, '*', '3p-script') !== 0 ) { return this; } } else if ( type === 'sub_frame' ) { if ( this.evaluateCellZ(srcHostname, '*', '3p-frame') !== 0 ) { return this; } diff --git a/src/js/messaging.js b/src/js/messaging.js index eaef2c77b9e6b..1e22bbf929856 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -245,7 +245,6 @@ var getFirewallRules = function(srcHostname, desHostnames) { r['/ * *'] = df.evaluateCellZY('*', '*', '*').toFilterString(); r['/ * image'] = df.evaluateCellZY('*', '*', 'image').toFilterString(); r['/ * 3p'] = df.evaluateCellZY('*', '*', '3p').toFilterString(); - r['/ * 3p-passive'] = df.evaluateCellZY('*', '*', '3p-passive').toFilterString(); r['/ * inline-script'] = df.evaluateCellZY('*', '*', 'inline-script').toFilterString(); r['/ * 1p-script'] = df.evaluateCellZY('*', '*', '1p-script').toFilterString(); r['/ * 3p-script'] = df.evaluateCellZY('*', '*', '3p-script').toFilterString(); @@ -257,7 +256,6 @@ var getFirewallRules = function(srcHostname, desHostnames) { r['. * *'] = df.evaluateCellZY(srcHostname, '*', '*').toFilterString(); r['. * image'] = df.evaluateCellZY(srcHostname, '*', 'image').toFilterString(); r['. * 3p'] = df.evaluateCellZY(srcHostname, '*', '3p').toFilterString(); - r['. * 3p-passive'] = df.evaluateCellZY(srcHostname, '*', '3p-passive').toFilterString(); r['. * inline-script'] = df.evaluateCellZY(srcHostname, '*', 'inline-script').toFilterString(); r['. * 1p-script'] = df.evaluateCellZY(srcHostname, '*', '1p-script').toFilterString(); r['. * 3p-script'] = df.evaluateCellZY(srcHostname, '*', '3p-script').toFilterString(); diff --git a/src/js/popup.js b/src/js/popup.js index 86a2026c4ab0d..f8a4af7e9c1be 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -321,7 +321,7 @@ var buildAllFirewallRows = function() { // Remove and reuse all rows: the order may have changed, we can't just // reuse them in-place. - rowsToRecycle = uDom('#firewallContainer > div:nth-of-type(8) ~ div').detach(); + rowsToRecycle = uDom('#firewallContainer > div:nth-of-type(7) ~ div').detach(); var n = allHostnameRows.length; for ( var i = 0; i < n; i++ ) { diff --git a/src/popup.html b/src/popup.html index cd31225b4d6b7..ef35b5659653a 100644 --- a/src/popup.html +++ b/src/popup.html @@ -38,7 +38,6 @@

 

-