1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 05:15: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

@@ -684,7 +684,7 @@ var CommandLine = Module("commandline", {
* Displays the multi-line output of a command, preceded by the last
* executed ex command string.
*
* @param {XML} xml The output as an E4X XML object.
* @param {object} xml The output as a JSON XML object.
*/
commandOutput: function commandOutput(xml) {
if (!this.command)

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) {

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
// Copyright (c) 2008-2013 Kris Maglione <maglione.k@gmail.com>
// Copyright (c) 2008-2014 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.