From 6f6922f0357842e4511953ef777356f4191b308a Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 28 Sep 2008 11:38:51 +0000 Subject: [PATCH] add some missing semicolons and remove some trailing commas --- content/bookmarks.js | 10 +++++----- content/buffer.js | 8 ++------ content/io.js | 2 +- content/tabs.js | 2 +- content/ui.js | 10 +++++----- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/content/bookmarks.js b/content/bookmarks.js index 8e228914..375cb500 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -68,9 +68,9 @@ liberator.Bookmarks = function () //{{{ function readBookmark(id) { return { - itemId: id, - uri: bookmarksService.getBookmarkURI(id).spec, - title: bookmarksService.getItemTitle(id), + itemId: id, + uri: bookmarksService.getBookmarkURI(id).spec, + title: bookmarksService.getItemTitle(id) }; } @@ -220,7 +220,7 @@ liberator.Bookmarks = function () //{{{ liberator.mappings.add(modes, ["A"], "Toggle bookmarked state of current URL", - function () { liberator.bookmarks.toggle(liberator.buffer.URL); }); + function () liberator.bookmarks.toggle(liberator.buffer.URL)); /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// COMMANDS //////////////////////////////////////////////// @@ -973,7 +973,7 @@ liberator.QuickMarks = function () //{{{ if (filter.length > 0) { - marks = marks.filter(function (qmark) filter.indexOf(qmark) >= 0) + marks = marks.filter(function (qmark) filter.indexOf(qmark) >= 0); if (marks.length == 0) { liberator.echoerr("E283: No QuickMarks matching \"" + filter + "\""); diff --git a/content/buffer.js b/content/buffer.js index 66a0880e..0a494248 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -1025,8 +1025,7 @@ liberator.Buffer = function () //{{{ var start = document.commandDispatcher.focusedWindow; frames = frames.filter(function (frame) { frame.focus(); - if (document.commandDispatcher.focusedWindow == frame) - return frame; + return document.commandDispatcher.focusedWindow == frame; }); start.focus(); @@ -1743,10 +1742,7 @@ liberator.Marks = function () //{{{ if (filter.length > 0) { - marks = marks.filter(function (mark) { - if (filter.indexOf(mark[0]) > -1) - return mark; - }); + marks = marks.filter(function (mark) filter.indexOf(mark[0]) >= 0); if (marks.length == 0) { liberator.echoerr("E283: No marks matching \"" + filter + "\""); diff --git a/content/io.js b/content/io.js index 3e03a8d9..ab984b43 100644 --- a/content/io.js +++ b/content/io.js @@ -546,7 +546,7 @@ liberator.IO = function () //{{{ let dir = environmentService.get("TMPDIR") || environmentService.get("TMP") || environmentService.get("TEMP") || (WINDOWS ? "C:\\" : "/tmp/"); - file.initWithPath(dir) + file.initWithPath(dir); file.appendRelativePath(tmpName); file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0600); diff --git a/content/tabs.js b/content/tabs.js index ed80cd88..0e1fab7e 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -147,7 +147,7 @@ liberator.Tabs = function () //{{{ return [ ["0", "Never show tab bar"], ["1", "Show tab bar only if more than one tab is open"], - ["2", "Always show tab bar"], + ["2", "Always show tab bar"] ]; }, validator: function (value) value >= 0 && value <= 2 diff --git a/content/ui.js b/content/ui.js index 849e0d3e..4055ad1d 100644 --- a/content/ui.js +++ b/content/ui.js @@ -403,7 +403,7 @@ liberator.CommandLine = function () //{{{ ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], - ["list:longest", "List all and complete common string"], + ["list:longest", "List all and complete common string"] ]; }, validator: function (value) @@ -463,7 +463,7 @@ liberator.CommandLine = function () //{{{ { if (lastMowOutput) liberator.commandline.echo(lastMowOutput, - liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE) + liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE); else liberator.beep(); }); @@ -1169,7 +1169,7 @@ liberator.CommandLine = function () //{{{ { completionIndex = historyIndex = UNINITIALIZED; wildIndex = 0; - }, + } }; //}}} }; //}}} @@ -1198,7 +1198,7 @@ liberator.ItemList = function (id) //{{{ var iframe = document.getElementById(id); if (!iframe) { - liberator.log("No iframe with id: " + id + " found, strange things may happen!") // "The truth is out there..." -- djk + liberator.log("No iframe with id: " + id + " found, strange things may happen!"); // "The truth is out there..." -- djk return; } @@ -1500,7 +1500,7 @@ liberator.StatusLine = function () //{{{ return [ ["0", "Never display status line"], ["1", "Display status line only if there are multiple windows"], - ["2", "Always display status line"], + ["2", "Always display status line"] ]; }, validator: function (value) value >= 0 && value <= 2