mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-02 17:03:33 +02:00
Use broader heuristic for regexps in Styles.compileFilter.
--HG-- branch : groups
This commit is contained in:
@@ -335,7 +335,7 @@ var Styles = Module("Styles", {
|
|||||||
matchFilter: function (filter) {
|
matchFilter: function (filter) {
|
||||||
if (filter === "*")
|
if (filter === "*")
|
||||||
var test = function test(uri) true;
|
var test = function test(uri) true;
|
||||||
else if (filter[0] === "^") {
|
else if (!/^(?:[a-z-]+:|[a-z-.]+$)/.test(filter)) {
|
||||||
let re = RegExp(filter);
|
let re = RegExp(filter);
|
||||||
test = function test(uri) re.test(uri.spec);
|
test = function test(uri) re.test(uri.spec);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user