1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 03:45:47 +01:00

Remove compatiblity cruft.

This commit is contained in:
Kris Maglione
2014-02-16 16:10:08 -08:00
parent 6202e94cb7
commit dee8fc3bba
11 changed files with 83 additions and 217 deletions

View File

@@ -216,22 +216,11 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
applyTriggerObserver: function triggerObserver(type, args) {
if (type in this._observers)
this._observers[type] = this._observers[type].filter(function (callback) {
if (callback.get()) {
try {
try {
callback.get().apply(null, args);
}
catch (e if e.message == "can't wrap XML objects") {
// Horrible kludge.
callback.get().apply(null, [String(args[0])].concat(args.slice(1)));
}
}
catch (e) {
dactyl.reportError(e);
}
return true;
}
this._observers[type] = this._observers[type]
.filter(callback => {
callback = callback.get();
if (callback)
util.trapErrors(() => callback.apply(null, args));
});
},
@@ -1922,7 +1911,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
// dactyl.hideGUI();
if (dactyl.userEval("typeof document", null, "test.js") === "undefined")
jsmodules.__proto__ = XPCSafeJSObjectWrapper(window);
jsmodules.__proto__ = window;
if (dactyl.commandLineOptions.preCommands)
dactyl.commandLineOptions.preCommands.forEach(function (cmd) {