1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 00:17:58 +01:00

some trivial formatting fixes

This commit is contained in:
Doug Kearns
2007-08-14 15:24:49 +00:00
parent 96b3fe093a
commit 9f79ec4d71
9 changed files with 47 additions and 26 deletions

View File

@@ -127,7 +127,8 @@ function Bookmarks() //{{{
{ {
bmResource = bmResources.getNext(); bmResource = bmResources.getNext();
type = BookmarksUtils.resolveType(bmResource); type = BookmarksUtils.resolveType(bmResource);
if (type != "ImmutableBookmark") { if (type != "ImmutableBookmark")
{
ptype = BookmarksUtils.resolveType(BMSVC.getParent(bmResource)); ptype = BookmarksUtils.resolveType(BMSVC.getParent(bmResource));
// alert(type); // alert(type);
// if ( type == "Folder") // store the current folder // if ( type == "Folder") // store the current folder

View File

@@ -556,8 +556,14 @@ function Commands() //{{{
{ {
vimperator.commandline.inputMultiline(new RegExp("^" + matches[2] + "$", "m"), vimperator.commandline.inputMultiline(new RegExp("^" + matches[2] + "$", "m"),
function(code) { function(code) {
try { eval(matches[1] + "\n" + code); } try
catch (e) { vimperator.echoerr(e.name + ": " + e.message); } {
eval(matches[1] + "\n" + code);
}
catch (e)
{
vimperator.echoerr(e.name + ": " + e.message);
}
}); });
} }
else // single line javascript code else // single line javascript code
@@ -654,11 +660,13 @@ function Commands() //{{{
addDefaultCommand(new Command(["ma[rk]"], addDefaultCommand(new Command(["ma[rk]"],
function(args) function(args)
{ {
if (!args) { if (!args)
{
vimperator.echoerr("E471: Argument required"); vimperator.echoerr("E471: Argument required");
return; return;
} }
if (args.length > 1) { if (args.length > 1)
{
vimperator.echoerr("E488: Trailing characters"); vimperator.echoerr("E488: Trailing characters");
return; return;
} }
@@ -823,7 +831,8 @@ function Commands() //{{{
addDefaultCommand(new Command(["qma[rk]"], addDefaultCommand(new Command(["qma[rk]"],
function(args) function(args)
{ {
if (!args) { if (!args)
{
vimperator.echoerr("E471: Argument required"); vimperator.echoerr("E471: Argument required");
return; return;
} }

View File

@@ -257,9 +257,12 @@ vimperator.completion = (function() // {{{
return []; return [];
var compl = match[2] || ''; var compl = match[2] || '';
try { try
{
var fd = vimperator.fopen(dir, "<"); var fd = vimperator.fopen(dir, "<");
} catch(e) { }
catch(e)
{
// thrown if file does not exist // thrown if file does not exist
return [ ]; return [ ];
} }

View File

@@ -652,7 +652,10 @@ function InformationList(id, options) //{{{
// remove all old items first // remove all old items first
var items = widget.getElementsByTagName("listitem"); var items = widget.getElementsByTagName("listitem");
while (items.length > 0) { widget.removeChild(items[0]);} while (items.length > 0)
{
widget.removeChild(items[0]);
}
if (!incremental_fill) if (!incremental_fill)
{ {

View File

@@ -326,9 +326,14 @@ const vimperator = (function() //{{{
for (var i in object) for (var i in object)
{ {
var value; var value;
try { try
{
var value = object[i]; var value = object[i];
} catch (e) { value = '' } }
catch (e)
{
value = '';
}
string += i + ': ' + value + '\n'; string += i + ': ' + value + '\n';
} }