[Pkg-mozext-commits] [adblock-plus] 17/74: Issue 2503 - Inconsistent behavior: $document flag implied for exception rules with protocol included

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 12:07:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 1c583e4d310efabd007b66b5006d1276db004704
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Mon May 18 19:50:08 2015 +0200

    Issue 2503 - Inconsistent behavior: $document flag implied for exception rules with protocol included
---
 lib/filterClasses.js | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/lib/filterClasses.js b/lib/filterClasses.js
index 80000ef..9f847f8 100644
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -704,15 +704,6 @@ RegExpFilter.fromText = function(text)
     }
   }
 
-  if (!blocking && (contentType == null || (contentType & RegExpFilter.typeMap.DOCUMENT)) &&
-      (!options || options.indexOf("DOCUMENT") < 0) && !/^\|?[\w\-]+:/.test(text))
-  {
-    // Exception filters shouldn't apply to pages by default unless they start with a protocol name
-    if (contentType == null)
-      contentType = RegExpFilter.prototype.contentType;
-    contentType &= ~RegExpFilter.typeMap.DOCUMENT;
-  }
-
   try
   {
     if (blocking)
@@ -751,8 +742,8 @@ RegExpFilter.typeMap = {
   ELEMHIDE: 0x40000000
 };
 
-// ELEMHIDE, POPUP option shouldn't be there by default
-RegExpFilter.prototype.contentType &= ~(RegExpFilter.typeMap.ELEMHIDE | RegExpFilter.typeMap.POPUP);
+// DOCUMENT, ELEMHIDE, POPUP options shouldn't be there by default
+RegExpFilter.prototype.contentType &= ~(RegExpFilter.typeMap.DOCUMENT | RegExpFilter.typeMap.ELEMHIDE | RegExpFilter.typeMap.POPUP);
 
 /**
  * Class for blocking filters

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list