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

Add as-yet undocumented site-specific mapping hives, :map -group flag, and :mapgroup command.

This commit is contained in:
Kris Maglione
2011-01-19 03:58:08 -05:00
parent b4d51da21c
commit 36c6393d5d
7 changed files with 112 additions and 15 deletions

View File

@@ -38,15 +38,15 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
cleanup: function cleanup() {
if (this.defaults != this)
this.defaults.cleanup();
this.branch.removeObserver("", this);
this._observers = {};
if (this.observe) {
this.branch.removeObserver("", this);
this.observe.unregister();
delete this.observe;
}
},
observe: null,
observers: {
"nsPref:changed": function (subject, data) {
let observers = this._observers[data];

View File

@@ -311,6 +311,10 @@ var Styles = Module("Styles", {
matchFilter: function (filter) {
if (filter === "*")
var test = function test(uri) true;
else if (filter[0] == "^") {
let re = RegExp(filter[0]);
test = function test(uri) re.test(uri.spec);
}
else if (/[*]$/.test(filter)) {
let re = RegExp("^" + util.regexp.escape(filter.substr(0, filter.length - 1)));
test = function test(uri) re.test(uri.spec);