1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 17:27:58 +01:00

First work towards cleaning up the commandline.js rat's nest. Don't expect any of these new interfaces to stay remotely as they are.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-26 01:24:54 -05:00
parent a66864d077
commit c284e1ced8
18 changed files with 829 additions and 790 deletions

View File

@@ -40,11 +40,15 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
this.commands["dactyl.restart"] = function (event) {
dactyl.restart();
};
styles.registerSheet("resource://dactyl-skin/dactyl.css");
},
cleanup: function () {
delete window.dactyl;
delete window.liberator;
styles.unregisterSheet("resource://dactyl-skin/dactyl.css");
},
destroy: function () {
@@ -1285,6 +1289,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
*/
trapErrors: function trapErrors(func, self) {
try {
if (isString(func))
func = self[func];
return func.apply(self || this, Array.slice(arguments, 2));
}
catch (e) {