1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-21 23:05:46 +01:00

Save option restore data until add-on is disabled. Cleanup preferences on uninstall.

This commit is contained in:
Kris Maglione
2011-07-29 05:29:06 -04:00
parent c165fd95be
commit a0de5d9e24
9 changed files with 180 additions and 130 deletions

View File

@@ -958,8 +958,9 @@ Class.prototype = {
func.superapply(self, Array.slice(arguments, 1));
}
}
try {
if ("value" in desc && i in this.localizedProperties)
if ("value" in desc && (k in this.localizedProperties || k in this.magicalProperties))
this[k] = desc.value;
else
Object.defineProperty(this, k, desc);
@@ -967,7 +968,9 @@ Class.prototype = {
catch (e) {}
}, this);
}
}
},
magicalProperties: {}
};
Class.makeClosure = function makeClosure() {
const self = this;