diff options
Diffstat (limited to 'src/js/dynamic-net-filtering.js')
-rw-r--r-- | src/js/dynamic-net-filtering.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/js/dynamic-net-filtering.js b/src/js/dynamic-net-filtering.js index 4ed0b45..7a7c411 100644 --- a/src/js/dynamic-net-filtering.js +++ b/src/js/dynamic-net-filtering.js @@ -295,12 +295,24 @@ Matrix.prototype.evaluateCellZY = function(srcHostname, desHostname, type) { /******************************************************************************/ +Matrix.prototype.mustAllowCellZY = function(srcHostname, desHostname, type) { + return this.evaluateCellZY(srcHostname, desHostname, type).r === 2; +}; + +/******************************************************************************/ + Matrix.prototype.mustBlockOrAllow = function() { return this.r === 1 || this.r === 2; }; /******************************************************************************/ +Matrix.prototype.mustBlock = function() { + return this.r === 1; +}; + +/******************************************************************************/ + Matrix.prototype.mustAbort = function() { return this.r === 3; }; @@ -325,13 +337,6 @@ Matrix.prototype.toFilterString = function() { /******************************************************************************/ -Matrix.prototype.mustBlock = function(srcHostname, desHostname, type) { - this.evaluateCellZY(srcHostname, desHostname, type); - return this.r === 1; -}; - -/******************************************************************************/ - Matrix.prototype.srcHostnameFromRule = function(rule) { return rule.slice(0, rule.indexOf(' ')); }; |