From bf5b6c451756ba2f37cabb34aec6cff44dc92db9 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 22 Nov 2014 09:36:45 -0200 Subject: [PATCH] code review --- src/js/matrix.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/js/matrix.js b/src/js/matrix.js index 7cf3e20..32dfba0 100644 --- a/src/js/matrix.js +++ b/src/js/matrix.js @@ -359,12 +359,6 @@ Matrix.prototype.evaluateCell = function(srcHostname, desHostname, type) { /******************************************************************************/ Matrix.prototype.evaluateCellZ = function(srcHostname, desHostname, type) { - // https://github.com/gorhill/uMatrix/issues/65 - // Hardcoded `doc` rule - if ( srcHostname === '*' && desHostname === '*' && type === 'doc' ) { - return 2; - } - var bitOffset = typeBitOffsets[type]; var s = srcHostname; var v; @@ -386,6 +380,11 @@ Matrix.prototype.evaluateCellZ = function(srcHostname, desHostname, type) { if ( type === '*' && µm.ubiquitousBlacklist.test(desHostname) ) { return 1; } + // https://github.com/gorhill/uMatrix/issues/65 + // Hardcoded `doc` rule + if ( type === 'doc' && desHostname === '*' ) { + return 2; + } return 0; };