From 5f63a0f984679218e3e86c62c1c67a78d144e783 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 23 Oct 2014 07:47:53 -0400 Subject: [PATCH] no good reason to prevent scopable literal "1st-party" --- src/js/matrix.js | 4 ++-- src/js/messaging-handlers.js | 2 +- src/js/popup.js | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/js/matrix.js b/src/js/matrix.js index 6695838..6870ff2 100644 --- a/src/js/matrix.js +++ b/src/js/matrix.js @@ -364,12 +364,12 @@ Matrix.prototype.evaluateCellZXY = function(srcHostname, desHostname, type) { // 1st-party specific-type cell: it's a special row, it exists only in // global scope. - r = this.evaluateCellZ('*', '1st-party', type); + r = this.evaluateCellZ(srcHostname, '1st-party', type); if ( r === 1 ) { return Matrix.RedIndirect; } if ( r === 2 ) { return Matrix.GreenIndirect; } // Do not override narrower rule if ( rl !== 2 ) { - rl = this.evaluateCellZ('*', '1st-party', '*'); + rl = this.evaluateCellZ(srcHostname, '1st-party', '*'); if ( rl === 1 ) { return Matrix.RedIndirect; } } } diff --git a/src/js/messaging-handlers.js b/src/js/messaging-handlers.js index 9f12d22..2a10108 100644 --- a/src/js/messaging-handlers.js +++ b/src/js/messaging-handlers.js @@ -120,7 +120,7 @@ var matrixSnapshot = function(details) { // These rows always exist r.rows['*'] = new RowSnapshot(r.scope, '*', '*'); - r.rows['1st-party'] = new RowSnapshot('*', '1st-party', '1st-party'); + r.rows['1st-party'] = new RowSnapshot(r.scope, '1st-party', '1st-party'); r.rowCount += 1; var µmuri = µm.URI; diff --git a/src/js/popup.js b/src/js/popup.js index 5f16504..f33892d 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -345,10 +345,9 @@ function handleFilter(button, leaning) { var cell = button.ancestors('div.matCell'); var type = cell.prop('reqType'); var desHostname = cell.prop('hostname'); - var srcHostname = desHostname !== '1st-party' ? matrixSnapshot.scope : '*'; var request = { what: getCellAction(desHostname, type, leaning), - srcHostname: srcHostname, + srcHostname: matrixSnapshot.scope, desHostname: desHostname, type: type };