1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-15 13:45:48 +01:00

Make negation in site-filters do something more sensible.

--HG--
extra : rebase_source : f49abc17efc3d111757f76b4a144f8f49db19a1a
This commit is contained in:
Kris Maglione
2011-02-11 05:14:37 -05:00
parent 41200aa6a9
commit 069a0e8147
2 changed files with 4 additions and 2 deletions

View File

@@ -230,7 +230,7 @@
<p>
In most cases, any of the above may be prefixed with a <tt>!</tt> character
to invert the sense of the match.
to exclude matching sites.
</p>
<h2 tag="using-scripts">Using scripts</h2>

View File

@@ -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);