Bug 410201 - Make /help do something useful on non-browser-apps
r=ajvincent@gmail.com (Alex Vincent) Venkman Only. NPOTDB. git-svn-id: svn://10.0.0.236/trunk@243605 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -332,6 +332,8 @@ msg.files.rec = Files
|
||||
#msg.doc.popuphdr = Popups
|
||||
#msg.doc.keyhdr = Keys
|
||||
|
||||
msg.help.hostproblem = You're running Venkman in an application which doesn't have a browser. Therefore, we can't show you this help content. If you install Venkman in Firefox, SeaMonkey or Flock, you can copy this URL into the address bar to show the help: x-jsd:help . You can also use the help command with a parameter to get help information on a specific command.
|
||||
|
||||
msg.note.console = This command is available from the console.
|
||||
msg.note.noconsole = This command is NOT available from the console.
|
||||
msg.note.needstack = You must be stopped at a breakpoint to use this command.
|
||||
|
||||
@@ -1180,27 +1180,28 @@ function cmdHelp (e)
|
||||
var ary;
|
||||
if (!e.pattern)
|
||||
{
|
||||
openTopWin ("x-jsd:help", "venkman-help");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ary = console.commandManager.list (e.pattern, CMD_CONSOLE);
|
||||
|
||||
if (ary.length == 0)
|
||||
if (!console.haveBrowser)
|
||||
{
|
||||
display (getMsg(MSN_ERR_NO_COMMAND, e.pattern), MT_ERROR);
|
||||
display(MSG_HELP_HOSTPROBLEM, MT_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i in ary)
|
||||
{
|
||||
display (getMsg(MSN_FMT_USAGE, [ary[i].name, ary[i].usage]),
|
||||
MT_USAGE);
|
||||
display (ary[i].help, MT_HELP);
|
||||
}
|
||||
openTopWin("x-jsd:help", "venkman-help");
|
||||
return true;
|
||||
}
|
||||
|
||||
ary = console.commandManager.list(e.pattern, CMD_CONSOLE);
|
||||
|
||||
if (ary.length == 0)
|
||||
{
|
||||
display(getMsg(MSN_ERR_NO_COMMAND, e.pattern), MT_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i in ary)
|
||||
{
|
||||
display(getMsg(MSN_FMT_USAGE, [ary[i].name, ary[i].usage]), MT_USAGE);
|
||||
display(ary[i].help, MT_HELP);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user