Skip to content

Commit

Permalink
change of mind: removing 3p-passive because redundancy, better to wor…
Browse files Browse the repository at this point in the history
…k on doc
  • Loading branch information
gorhill committed Jul 27, 2015
1 parent eeb4884 commit 8dd21c5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
10 changes: 3 additions & 7 deletions src/js/dynamic-net-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -57,8 +56,7 @@ var typeBitOffsets = {
'3p-script': 6,
'3p-frame': 8,
'image': 10,
'3p': 12,
'3p-passive': 14
'3p': 12
};

var actionToNameMap = {
Expand Down Expand Up @@ -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; }
Expand Down
2 changes: 0 additions & 2 deletions src/js/messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++ ) {
Expand Down
1 change: 0 additions & 1 deletion src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ <h2 data-i18n="popupHitDomainCountPrompt">&nbsp;</h2>
<div><span data-i18n="popupAnyRulePrompt"></span><span data-src="/" data-des="*" data-type="*"> </span><span data-src="." data-des="*" data-type="*"> </span></div>
<div><span data-i18n="popupImageRulePrompt"></span><span data-src="/" data-des="*" data-type="image"> </span><span data-src="." data-des="*" data-type="image"> </span></div>
<div><span data-i18n="popup3pAnyRulePrompt"></span><span data-src="/" data-des="*" data-type="3p"> </span><span data-src="." data-des="*" data-type="3p"> </span></div>
<div><span data-i18n="popup3pPassiveRulePrompt"></span><span data-src="/" data-des="*" data-type="3p-passive"> </span><span data-src="." data-des="*" data-type="3p-passive"> </span></div>
<div><span data-i18n="popupInlineScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="inline-script"> </span><span data-src="." data-des="*" data-type="inline-script"> </span></div>
<div><span data-i18n="popup1pScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="1p-script"> </span><span data-src="." data-des="*" data-type="1p-script"> </span></div>
<div><span data-i18n="popup3pScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="3p-script"> </span><span data-src="." data-des="*" data-type="3p-script"> </span></div>
Expand Down

0 comments on commit 8dd21c5

Please sign in to comment.