mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 20:17:58 +01:00
some trivial formatting fixes
This commit is contained in:
@@ -127,7 +127,8 @@ function Bookmarks() //{{{
|
||||
{
|
||||
bmResource = bmResources.getNext();
|
||||
type = BookmarksUtils.resolveType(bmResource);
|
||||
if (type != "ImmutableBookmark") {
|
||||
if (type != "ImmutableBookmark")
|
||||
{
|
||||
ptype = BookmarksUtils.resolveType(BMSVC.getParent(bmResource));
|
||||
// alert(type);
|
||||
// if ( type == "Folder") // store the current folder
|
||||
|
||||
@@ -556,8 +556,14 @@ function Commands() //{{{
|
||||
{
|
||||
vimperator.commandline.inputMultiline(new RegExp("^" + matches[2] + "$", "m"),
|
||||
function(code) {
|
||||
try { eval(matches[1] + "\n" + code); }
|
||||
catch (e) { vimperator.echoerr(e.name + ": " + e.message); }
|
||||
try
|
||||
{
|
||||
eval(matches[1] + "\n" + code);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
vimperator.echoerr(e.name + ": " + e.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
else // single line javascript code
|
||||
@@ -654,11 +660,13 @@ function Commands() //{{{
|
||||
addDefaultCommand(new Command(["ma[rk]"],
|
||||
function(args)
|
||||
{
|
||||
if (!args) {
|
||||
if (!args)
|
||||
{
|
||||
vimperator.echoerr("E471: Argument required");
|
||||
return;
|
||||
}
|
||||
if (args.length > 1) {
|
||||
if (args.length > 1)
|
||||
{
|
||||
vimperator.echoerr("E488: Trailing characters");
|
||||
return;
|
||||
}
|
||||
@@ -823,7 +831,8 @@ function Commands() //{{{
|
||||
addDefaultCommand(new Command(["qma[rk]"],
|
||||
function(args)
|
||||
{
|
||||
if (!args) {
|
||||
if (!args)
|
||||
{
|
||||
vimperator.echoerr("E471: Argument required");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -257,9 +257,12 @@ vimperator.completion = (function() // {{{
|
||||
return [];
|
||||
|
||||
var compl = match[2] || '';
|
||||
try {
|
||||
try
|
||||
{
|
||||
var fd = vimperator.fopen(dir, "<");
|
||||
} catch(e) {
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
// thrown if file does not exist
|
||||
return [ ];
|
||||
}
|
||||
|
||||
@@ -652,7 +652,10 @@ function InformationList(id, options) //{{{
|
||||
|
||||
// remove all old items first
|
||||
var items = widget.getElementsByTagName("listitem");
|
||||
while (items.length > 0) { widget.removeChild(items[0]);}
|
||||
while (items.length > 0)
|
||||
{
|
||||
widget.removeChild(items[0]);
|
||||
}
|
||||
|
||||
if (!incremental_fill)
|
||||
{
|
||||
|
||||
@@ -326,9 +326,14 @@ const vimperator = (function() //{{{
|
||||
for (var i in object)
|
||||
{
|
||||
var value;
|
||||
try {
|
||||
try
|
||||
{
|
||||
var value = object[i];
|
||||
} catch (e) { value = '' }
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
value = '';
|
||||
}
|
||||
|
||||
string += i + ': ' + value + '\n';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user