aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/dynamic-net-filtering.js
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-02-05 23:14:12 -0500
committergorhill <rhill@raymondhill.net>2015-02-05 23:14:12 -0500
commitd0f81f5e3baf209b56d7a99f0d39fbd3e51d6439 (patch)
tree4e9e5a5f3d5a13dda77850932cec1042aae34a0f /src/js/dynamic-net-filtering.js
parent684dd00e1aaaa750b7bcec6e088d7460ba099568 (diff)
downloaduBlock-d0f81f5e3baf209b56d7a99f0d39fbd3e51d6439.zip
uBlock-d0f81f5e3baf209b56d7a99f0d39fbd3e51d6439.tar.gz
uBlock-d0f81f5e3baf209b56d7a99f0d39fbd3e51d6439.tar.bz2
this fixes #689
Diffstat (limited to 'src/js/dynamic-net-filtering.js')
-rw-r--r--src/js/dynamic-net-filtering.js19
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(' '));
};