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:
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user