1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-08 21:45:47 +01:00

Use broader heuristic for regexps in Styles.compileFilter.

--HG--
branch : groups
This commit is contained in:
Kris Maglione
2011-02-05 08:30:44 -05:00
parent 2e27dc3571
commit 4b8e834fa6

View File

@@ -335,7 +335,7 @@ var Styles = Module("Styles", {
matchFilter: function (filter) {
if (filter === "*")
var test = function test(uri) true;
else if (filter[0] === "^") {
else if (!/^(?:[a-z-]+:|[a-z-.]+$)/.test(filter)) {
let re = RegExp(filter);
test = function test(uri) re.test(uri.spec);
}