From 0a3ec8c768166cc6dc4791249e2680e910cb384e Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 20 Nov 2010 16:03:21 -0500 Subject: [PATCH] Make the silly ':hi Bell display:none;' hack function again. --- common/content/commandline.js | 16 +++------------- common/content/commands.js | 2 +- common/content/dactyl.js | 23 +++++++++-------------- common/content/tabs.js | 4 ++-- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/common/content/commandline.js b/common/content/commandline.js index 0f900c37..c58b894a 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -1583,19 +1583,11 @@ const CommandLine = Module("commandline", { if (!arg) return ""; - try { - arg = dactyl.userEval(arg); - } - catch (e) { - dactyl.echoerr(e); - return null; - } - - if (typeof arg === "object") + arg = dactyl.userEval(arg); + if (isObject(arg)) arg = util.objectToString(arg, useColor); else arg = String(arg); - return arg; } }, { @@ -1620,9 +1612,7 @@ const CommandLine = Module("commandline", { commands.add([command.name], command.description, function (args) { - let str = CommandLine.echoArgumentToString(args[0] || "", true); - if (str != null) - command.action(str); + command.action(CommandLine.echoArgumentToString(args[0] || "", true)); }, { completer: function (context) completion.javascript(context), literal: 0 diff --git a/common/content/commands.js b/common/content/commands.js index 478b5263..4593cd1c 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -147,7 +147,7 @@ const Command = Class("Command", { if (args.bang && !this.bang) throw FailedAssertion("E477: No ! allowed"); - dactyl.trapErrors(function exec(command) { + return !dactyl.trapErrors(function exec(command) { if (this.always) this.always(args, modifiers); if (!io.sourcing || !io.sourcing.noExecute) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index ed6fd896..fc3f3e67 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -143,10 +143,10 @@ const Dactyl = Module("dactyl", { let strut = document.getElementById("dactyl-bell-strut"); if (!bell) { bell = document.documentElement.insertBefore( - util.xmlToDom(