Browse Source

no good reason to prevent scopable literal "1st-party"

pull/2/head
gorhill 10 years ago
parent
commit
5f63a0f984
  1. 4
      src/js/matrix.js
  2. 2
      src/js/messaging-handlers.js
  3. 3
      src/js/popup.js

4
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; }
}
}

2
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;

3
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
};

Loading…
Cancel
Save