mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-17 10:05:45 +01:00
Deal with fallout from 609832.
This commit is contained in:
@@ -309,15 +309,15 @@ var Styles = Module("Styles", {
|
||||
*/
|
||||
matchFilter: function (filter) {
|
||||
if (filter === "*")
|
||||
function test(uri) true;
|
||||
var test = function test(uri) true;
|
||||
else if (/[*]$/.test(filter)) {
|
||||
let re = RegExp("^" + util.regexp.escape(filter.substr(0, filter.length - 1)));
|
||||
function test(uri) re.test(uri.spec);
|
||||
test = function test(uri) re.test(uri.spec);
|
||||
}
|
||||
else if (/[\/:]/.test(filter))
|
||||
function test(uri) uri.spec === filter;
|
||||
test = function test(uri) uri.spec === filter;
|
||||
else
|
||||
function test(uri) { try { return util.isSubdomain(uri.host, filter); } catch (e) { return false; } };
|
||||
test = function test(uri) { try { return util.isSubdomain(uri.host, filter); } catch (e) { return false; } };
|
||||
test.toString = function toString() filter;
|
||||
if (arguments.length < 2)
|
||||
return test;
|
||||
|
||||
Reference in New Issue
Block a user