1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-15 21:23:31 +02:00

remove the trailing HR from the help tables

This commit is contained in:
Doug Kearns
2007-07-13 16:40:36 +00:00
parent 65ddc4a375
commit e884844dad

View File

@@ -33,6 +33,7 @@ Vimperator.prototype.help = function(section, easter) //{{{
vimperator.echoerr("E478: Don't panic!"); vimperator.echoerr("E478: Don't panic!");
return; return;
} }
if ((arguments[3] && arguments[3].inTab))// || !window.content.document.open) if ((arguments[3] && arguments[3].inTab))// || !window.content.document.open)
openURLsInNewTab("", true); openURLsInNewTab("", true);
else else
@@ -46,6 +47,7 @@ Vimperator.prototype.help = function(section, easter) //{{{
function makeHelpString(commands, beg, end, func) function makeHelpString(commands, beg, end, func)
{ {
var ret = ""; var ret = "";
var separator = '<tr class="separator"><td colspan="3"><hr/></td></tr>\n';
for (var command in commands) for (var command in commands)
{ {
// the usage information for the command // the usage information for the command
@@ -74,7 +76,7 @@ Vimperator.prototype.help = function(section, easter) //{{{
ret += '<span class="shorthelp">'; ret += '<span class="shorthelp">';
ret += command.short_help; // the help description ret += command.short_help; // the help description
ret += "</span><br/>"; ret += "</span><br/>";
if(func) // for options we print default values here, e.g. if (func) // for options we print default values here, e.g.
{ {
ret += func.call(this, command); ret += func.call(this, command);
ret += "<br/>"; ret += "<br/>";
@@ -103,18 +105,19 @@ Vimperator.prototype.help = function(section, easter) //{{{
ret += '</td></tr>'; ret += '</td></tr>';
// add more space between entries // add more space between entries
// FIXME: if (i < commands.length-1) ret += separator;
ret += '<tr class="separator"><td colspan="3"><hr/></td></tr>\n';
} }
ret = ret.replace(new RegExp(separator + '$'), ''); // FIXME: far too tasty!
return ret; return ret;
} }
function makeOptionsHelpString(command) function makeOptionsHelpString(command)
{ {
var ret = ""; var ret = "";
ret = command.type + ' (default: '; ret = command.type + ' (default: ';
if (command.type == "boolean") if (command.type == "boolean")
{ {
if(command.default_value == true) if (command.default_value == true)
ret += "on"; ret += "on";
else else
ret += "off"; ret += "off";