зеркало из https://github.com/mozilla/pjs.git
Bug 410201 - Make /help do something useful on non-browser-apps
r=ajvincent@gmail.com (Alex Vincent) Venkman Only. NPOTDB.
This commit is contained in:
Родитель
94ec797158
Коммит
33fefab8d4
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче