From 069a0e81474fc56260f4fb1c10e98c7aa1902e2a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 11 Feb 2011 05:14:37 -0500 Subject: [PATCH] Make negation in site-filters do something more sensible. --HG-- extra : rebase_source : f49abc17efc3d111757f76b4a144f8f49db19a1a --- common/locale/en-US/repeat.xml | 2 +- common/modules/contexts.jsm | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/locale/en-US/repeat.xml b/common/locale/en-US/repeat.xml index 88993e53..d83c566b 100644 --- a/common/locale/en-US/repeat.xml +++ b/common/locale/en-US/repeat.xml @@ -230,7 +230,7 @@

In most cases, any of the above may be prefixed with a ! character - to invert the sense of the match. + to exclude matching sites.

Using scripts

diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index c8ba8951..35eab254 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -47,7 +47,9 @@ var Group = Class("Group", { }, { compileFilter: function (patterns) { - function siteFilter(uri) siteFilter.filters.every(function (f) f(uri) == f.result); + function siteFilter(uri) + let (match = array.nth(siteFilter.filters, function (f) f(uri), 0)) + match && match.result; if (!isArray(patterns)) patterns = Option.splitList(patterns, true);