From c1390135d206ccf92879df054fb7d5111675774a Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 27 May 2008 15:15:36 +0000 Subject: [PATCH] whitespace fixes --- content/buffer.js | 2 +- content/commands.js | 4 ++-- content/completion.js | 8 +++---- content/editor.js | 10 ++++----- content/events.js | 6 ++--- content/hints.js | 6 ++--- content/liberator.js | 10 ++++----- content/mail.js | 48 +++++++++++++++++++-------------------- content/mappings.js | 2 +- content/muttator.js | 52 +++++++++++++++++++++---------------------- content/options.js | 2 +- content/tabs.js | 4 ++-- content/util.js | 2 +- content/vimperator.js | 52 +++++++++++++++++++++---------------------- 14 files changed, 104 insertions(+), 104 deletions(-) diff --git a/content/buffer.js b/content/buffer.js index 420b47dd..31cdb564 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -200,7 +200,7 @@ liberator.Buffer = function () //{{{ liberator.mappings.add(modes, [""], "Stop loading", - function() { BrowserStop(); }); + function () { BrowserStop(); }); // scrolling liberator.mappings.add(modes, ["j", "", ""], diff --git a/content/commands.js b/content/commands.js index 1d369c4e..51b01f08 100644 --- a/content/commands.js +++ b/content/commands.js @@ -445,8 +445,8 @@ liberator.Commands = function () //{{{ // Idea: If v.commands.add() specifies args or opts in extraInfo, don't call the function // with args as a string, but already pass an object like: // args = { -option: value, -anotheroption: true, arguments: [] } - getOption: function(opts, option, def) { return getOption(opts, option, def); }, - parseArgs: function(str, options) { return parseArgs(str, options); }, + getOption: function (opts, option, def) { return getOption(opts, option, def); }, + parseArgs: function (str, options) { return parseArgs(str, options); }, OPTION_ANY: 0, // can be given no argument or an argument of any type, // caller is responsible for parsing the return value diff --git a/content/completion.js b/content/completion.js index 053a2364..7f8984d1 100644 --- a/content/completion.js +++ b/content/completion.js @@ -178,7 +178,7 @@ liberator.Completion = function () //{{{ return [0, buildLongestCommonSubstring(mapped, filter)]; }, - searchEngineSuggest: function(filter, engineAliases) + searchEngineSuggest: function (filter, engineAliases) { if (!filter) return [0,null]; @@ -189,7 +189,7 @@ liberator.Completion = function () //{{{ .getService(Components.interfaces.nsIBrowserSearchService); var completions = []; - engineList.forEach (function(name) + engineList.forEach (function (name) { var query = filter; var queryURI; @@ -211,7 +211,7 @@ liberator.Completion = function () //{{{ if (!results) return; - results.forEach(function(item) + results.forEach(function (item) { completions.push([(matches ? matches[1] : "") + item, name + " suggestion"]); }); @@ -407,7 +407,7 @@ liberator.Completion = function () //{{{ { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); - var prefArray = prefs.getChildList("", {value: 0}); + var prefArray = prefs.getChildList("", { value: 0 }); prefArray.sort(); if (filter.length > 0 && filter.lastIndexOf("=") == filter.length - 1) diff --git a/content/editor.js b/content/editor.js index c9d0a8fb..d1e26678 100644 --- a/content/editor.js +++ b/content/editor.js @@ -408,7 +408,7 @@ liberator.Editor = function () //{{{ if (pos >= 0) liberator.editor.moveToPosition(pos, true, liberator.mode == liberator.modes.VISUAL); }, - { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT}); + { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT }); liberator.mappings.add([liberator.modes.TEXTAREA, liberator.modes.VISUAL], ["F"], "Move to a charater on the current line before the cursor", @@ -418,7 +418,7 @@ liberator.Editor = function () //{{{ if (pos >= 0) liberator.editor.moveToPosition(pos, false, liberator.mode == liberator.modes.VISUAL); }, - { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT}); + { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT }); liberator.mappings.add([liberator.modes.TEXTAREA, liberator.modes.VISUAL], ["t"], "Move before a character on the current line", @@ -428,7 +428,7 @@ liberator.Editor = function () //{{{ if (pos >= 0) liberator.editor.moveToPosition(pos - 1, true, liberator.mode == liberator.modes.VISUAL); }, - { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT}); + { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT }); liberator.mappings.add([liberator.modes.TEXTAREA, liberator.modes.VISUAL], ["T"], "Move before a character on the current line, backwards", @@ -438,7 +438,7 @@ liberator.Editor = function () //{{{ if (pos >= 0) liberator.editor.moveToPosition(pos + 1, false, liberator.mode == liberator.modes.VISUAL); }, - { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT}); + { flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT }); /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// COMMANDS //////////////////////////////////////////////// @@ -801,7 +801,7 @@ liberator.Editor = function () //{{{ editor.selection.addRange(wholeDocRange); editor.selection.deleteFromDocument(); editor.insertText(val); - //setTimeout(function() { + //setTimeout(function () { // document.getElementById("content-frame").contentDocument.designMode = "off"; //}, 100); } diff --git a/content/events.js b/content/events.js index cfb02f6b..8c23bb78 100644 --- a/content/events.js +++ b/content/events.js @@ -26,7 +26,7 @@ the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. }}} ***** END LICENSE BLOCK *****/ -liberator.AutoCommands = function() //{{{ +liberator.AutoCommands = function () //{{{ { //////////////////////////////////////////////////////////////////////////////// ////////////////////// PRIVATE SECTION ///////////////////////////////////////// @@ -503,7 +503,7 @@ liberator.Events = function () //{{{ // load all macros inside ~/.vimperator/macros/ // setTimeout needed since liberator.io. is loaded after liberator.events. - setTimeout (function() { + setTimeout (function () { try { var files = liberator.io.readDirectory(liberator.io.getSpecialDirectory("macros")); @@ -959,7 +959,7 @@ liberator.Events = function () //{{{ { dump("Compose editor got focus\n"); liberator.modes.set(liberator.modes.INSERT, liberator.modes.TEXTAREA); - //setTimeout(function(){liberator.editor.editWithExternalEditor();}, 100); + //setTimeout(function (){ liberator.editor.editWithExternalEditor(); }, 100); win.blur(); //liberator.editor.editWithExternalEditor(); } diff --git a/content/hints.js b/content/hints.js index 4b504fbd..a2cf92b0 100644 --- a/content/hints.js +++ b/content/hints.js @@ -129,7 +129,7 @@ liberator.Hints = function () //{{{ } doc.body.appendChild(fragment); - docs.push({ doc: doc, start: start, end: hints.length - 1}); + docs.push({ doc: doc, start: start, end: hints.length - 1 }); // also generate hints for frames for (var i = 0; i < win.frames.length; i++) @@ -338,8 +338,8 @@ liberator.Hints = function () //{{{ case "V": liberator.buffer.viewSource(loc, true); break; case "w": liberator.buffer.followLink(elem, liberator.NEW_WINDOW); break; case "W": liberator.commandline.open(":", "winopen " + loc, liberator.modes.EX); break; - case "y": setTimeout(function(){liberator.util.copyToClipboard(loc, true)}, timeout + 50); break; - case "Y": setTimeout(function(){liberator.util.copyToClipboard(elem.textContent || "", true)}, timeout + 50); break; + case "y": setTimeout(function () { liberator.util.copyToClipboard(loc, true) }, timeout + 50); break; + case "Y": setTimeout(function () { liberator.util.copyToClipboard(elem.textContent || "", true) }, timeout + 50); break; default: liberator.echoerr("INTERNAL ERROR: unknown submode: " + submode); } diff --git a/content/liberator.js b/content/liberator.js index 40f3d2f0..3e2a9126 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -45,7 +45,7 @@ const liberator = (function () //{{{ var guioptions = liberator.config.guioptions || {}; for (let option in guioptions) { - guioptions[option].forEach( function(elem) + guioptions[option].forEach(function (elem) { try { @@ -385,7 +385,7 @@ const liberator = (function () //{{{ var guioptions = liberator.config.guioptions || {}; for (let option in guioptions) { - guioptions[option].forEach( function(elem) + guioptions[option].forEach(function (elem) { try { @@ -612,10 +612,10 @@ const liberator = (function () //{{{ has: function (feature) { var features = liberator.config.features || []; - return features.some (function(feat) { return feat == feature; }); + return features.some (function (feat) { return feat == feature; }); }, - help: function(topic) + help: function (topic) { var where = (liberator.options.newtab && (liberator.options.newtab == "all" || liberator.options.newtab.split(",").indexOf("help") != -1)) ? liberator.NEW_TAB : liberator.CURRENT_TAB; @@ -623,7 +623,7 @@ const liberator = (function () //{{{ function jumpToTag(file, tag) { liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/" + file, where); - setTimeout(function() { + setTimeout(function () { var elem = liberator.buffer.getElement('@class="tag" and text()="' + tag + '"'); if (elem) window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context diff --git a/content/mail.js b/content/mail.js index 0e7c42f6..b04a9990 100644 --- a/content/mail.js +++ b/content/mail.js @@ -38,15 +38,15 @@ liberator.Mail = function () //{{{ var selectMessageReverse = false; var folderListener = { - OnItemAdded: function(parentItem, item) { }, - OnItemRemoved: function(parentItem, item) { }, - OnItemPropertyChanged: function(item, property, oldValue, newValue) { }, - OnItemIntPropertyChanged: function(item, property, oldValue, newValue) { }, - OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) { }, - OnItemUnicharPropertyChanged: function(item, property, oldValue, newValue) { }, - OnItemPropertyFlagChanged: function(item, property, oldFlag, newFlag) { }, + OnItemAdded: function (parentItem, item) { }, + OnItemRemoved: function (parentItem, item) { }, + OnItemPropertyChanged: function (item, property, oldValue, newValue) { }, + OnItemIntPropertyChanged: function (item, property, oldValue, newValue) { }, + OnItemBoolPropertyChanged: function (item, property, oldValue, newValue) { }, + OnItemUnicharPropertyChanged: function (item, property, oldValue, newValue) { }, + OnItemPropertyFlagChanged: function (item, property, oldFlag, newFlag) { }, - OnItemEvent: function(folder, event) + OnItemEvent: function (folder, event) { var eventType = event.toString(); if (eventType == "FolderLoaded") @@ -119,12 +119,12 @@ liberator.Mail = function () //{{{ if (copy) { MsgCopyMessage(folders[0].URI); - setTimeout(function() { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100); + setTimeout(function () { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100); } else { MsgMoveMessage(folders[0].URI); - setTimeout(function() { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100); + setTimeout(function () { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100); } return true; } @@ -296,7 +296,7 @@ liberator.Mail = function () //{{{ try { var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase(); - liberator.mail.selectMessage(function(msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, false, count); + liberator.mail.selectMessage(function (msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, false, count); } catch (e) { liberator.beep(); } }, @@ -309,7 +309,7 @@ liberator.Mail = function () //{{{ try { var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase(); - liberator.mail.selectMessage(function(msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, true, count); + liberator.mail.selectMessage(function (msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, true, count); } catch (e) { liberator.beep(); } }, @@ -415,22 +415,22 @@ liberator.Mail = function () //{{{ liberator.mappings.add(modes, ["]s"], "Select next starred message", - function (count) { liberator.mail.selectMessage(function(msg) { return msg.isFlagged; }, true, true, false, count); }, + function (count) { liberator.mail.selectMessage(function (msg) { return msg.isFlagged; }, true, true, false, count); }, { flags: liberator.Mappings.flags.COUNT }); liberator.mappings.add(modes, ["[s"], "Select previous starred message", - function (count) { liberator.mail.selectMessage(function(msg) { return msg.isFlagged; }, true, true, true, count); }, + function (count) { liberator.mail.selectMessage(function (msg) { return msg.isFlagged; }, true, true, true, count); }, { flags: liberator.Mappings.flags.COUNT }); liberator.mappings.add(modes, ["]a"], "Select next message with an attachment", - function (count) { liberator.mail.selectMessage(function(msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, false, count); }, + function (count) { liberator.mail.selectMessage(function (msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, false, count); }, { flags: liberator.Mappings.flags.COUNT }); liberator.mappings.add(modes, ["[a"], "Select previous message with an attachment", - function (count) { liberator.mail.selectMessage(function(msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, true, count); }, + function (count) { liberator.mail.selectMessage(function (msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, true, count); }, { flags: liberator.Mappings.flags.COUNT }); // FOLDER SWITCHING @@ -587,7 +587,7 @@ liberator.Mail = function () //{{{ "Mark all messages as read", function () { - liberator.mail.getFolders("", false).forEach(function(folder) { + liberator.mail.getFolders("", false).forEach(function (folder) { folder.markAllMessagesRead(); }); }); @@ -667,7 +667,7 @@ liberator.Mail = function () //{{{ QueryInterface(Components.interfaces.nsIMsgFolder); }, - getFolders: function(filter, includeServers, includeMsgFolders) + getFolders: function (filter, includeServers, includeMsgFolders) { var folders = []; if (!filter) @@ -695,15 +695,15 @@ liberator.Mail = function () //{{{ return folders; }, - getNewMessages: function(currentAccountOnly) + getNewMessages: function (currentAccountOnly) { var accounts = currentAccountOnly ? [this.currentAccount] : this.getFolders("", true, false); - accounts.forEach( function(account) { account.getNewMessages(msgWindow, null); }); + accounts.forEach(function (account) { account.getNewMessages(msgWindow, null); }); }, - getStatistics: function(currentAccountOnly) + getStatistics: function (currentAccountOnly) { var accounts = currentAccountOnly ? [this.currentAccount] : this.getFolders("", true, false); @@ -720,7 +720,7 @@ liberator.Mail = function () //{{{ return { numUnread: unreadCount, numTotal: totalCount, numNew: newCount } }, - collapseThread: function() + collapseThread: function () { var tree = GetThreadTree(); if (tree) @@ -736,7 +736,7 @@ liberator.Mail = function () //{{{ return false; }, - expandThread: function() + expandThread: function () { var tree = GetThreadTree(); if (tree) @@ -755,7 +755,7 @@ liberator.Mail = function () //{{{ * @param openThreads: should we open closed threads? * @param reverse: change direction of searching */ - selectMessage: function(validatorFunc, canWrap, openThreads, reverse, count) + selectMessage: function (validatorFunc, canWrap, openThreads, reverse, count) { function closedThread(index) { diff --git a/content/mappings.js b/content/mappings.js index ea61936f..f492c997 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -38,7 +38,7 @@ liberator.Map = function (modes, cmds, description, action, extraInfo) //{{{ this.modes = modes; // only store keysyms with uppercase modifier strings - this.names = cmds.map(function (cmd) { return cmd.replace(/[casm]-/g, function (name) { return name.toUpperCase(); });}); + this.names = cmds.map(function (cmd) { return cmd.replace(/[casm]-/g, function (name) { return name.toUpperCase(); }); }); this.action = action; this.flags = extraInfo.flags || 0; diff --git a/content/muttator.js b/content/muttator.js index ccd23235..148ce52e 100644 --- a/content/muttator.js +++ b/content/muttator.js @@ -46,48 +46,48 @@ liberator.config = { dialogs: [ ["about", "About Thunderbird", //XXX: Shredder ? - function() { openAboutDialog(); }], + function () { openAboutDialog(); }], ["addons", "Manage Add-ons", - function() { openAddonsMgr(); }], + function () { openAddonsMgr(); }], ["checkupdates", "Check for updates", - function() { checkForUpdates(); }], + function () { checkForUpdates(); }], /*["cleardata", "Clear private data", - function() { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],*/ + function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],*/ ["console", "JavaScript console", - function() { toJavaScriptConsole(); }], + function () { toJavaScriptConsole(); }], /*["customizetoolbar", "Customize the Toolbar", - function() { BrowserCustomizeToolbar(); }],*/ + function () { BrowserCustomizeToolbar(); }],*/ ["dominspector", "DOM Inspector", - function() { inspectDOMDocument(content.document); }], + function () { inspectDOMDocument(content.document); }], ["downloads", "Manage Downloads", - function() { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }], + function () { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }], /*["import", "Import Preferences, Bookmarks, History, etc. from other browsers", - function() { BrowserImport(); }], + function () { BrowserImport(); }], ["openfile", "Open the file selector dialog", - function() { BrowserOpenFileWindow(); }], + function () { BrowserOpenFileWindow(); }], ["pageinfo", "Show information about the current page", - function() { BrowserPageInfo(); }], + function () { BrowserPageInfo(); }], ["pagesource", "View page source", - function() { BrowserViewSourceOfDocument(content.document); }], + function () { BrowserViewSourceOfDocument(content.document); }], ["preferences", "Show Firefox preferences dialog", - function() { openPreferences(); }], + function () { openPreferences(); }], ["printpreview", "Preview the page before printing", - function() { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],*/ + function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],*/ ["printsetup", "Setup the page size and orientation before printing", - function() { PrintUtils.showPageSetup(); }], + function () { PrintUtils.showPageSetup(); }], ["print", "Show print dialog", - function() { PrintUtils.print(); }], + function () { PrintUtils.print(); }], ["saveframe", "Save frame to disk", - function() { saveFrameDocument(); }], + function () { saveFrameDocument(); }], ["savepage", "Save page to disk", - function() { saveDocument(window.content.document); }], + function () { saveDocument(window.content.document); }], /*["searchengines", "Manage installed search engines", - function() { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], + function () { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], ["selectionsource", "View selection source", - function() { liberator.buffer.viewSelectionSource(); }]*/ + function () { liberator.buffer.viewSelectionSource(); }]*/ ], - init: function() + init: function () { liberator.mappings.add([liberator.modes.NORMAL], ["o"], "Open a message", @@ -112,20 +112,20 @@ liberator.config = { if (this.isComposeWindow) { - /*setTimeout(function() { + /*setTimeout(function () { document.getElementById("content-frame").contentDocument.designMode = "off"; document.getElementById("content-frame").focus(); }, 500);*/ - //document.getElementById("content-frame").contentWindow.addEventListener("load", function() { - /*window.addEventListener("load", function() { + //document.getElementById("content-frame").contentWindow.addEventListener("load", function () { + /*window.addEventListener("load", function () { alert("load"); if (! liberator.editor.editWithExternalEditor()) liberator.echoerr("Editing with external editor failed. Be sure to :set editor correctly"); }, true); - document.getElementById("content-frame").contentDocument.addEventListener("load", function() { + document.getElementById("content-frame").contentDocument.addEventListener("load", function () { alert("load1"); }, true);*/ - /*document.getElementById("content-frame").addEventListener("DOMContentLoaded", function() { + /*document.getElementById("content-frame").addEventListener("DOMContentLoaded", function () { alert("load2"); }, true);*/ } diff --git a/content/options.js b/content/options.js index a0ad5843..a4dcf267 100644 --- a/content/options.js +++ b/content/options.js @@ -684,7 +684,7 @@ liberator.Options = function () //{{{ if (!filter) filter = ""; - var prefArray = prefService.getChildList("", {value: 0}); + var prefArray = prefService.getChildList("", { value: 0 }); prefArray.sort(); var list = ":" + liberator.util.escapeHTML(liberator.commandline.getCommand()) + "
" + "
--- " + liberator.config.hostApplication + diff --git a/content/tabs.js b/content/tabs.js index bd6af526..ff72a93f 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -92,7 +92,7 @@ liberator.Tabs = function () //{{{ "Define which commands should output in a new tab by default", "stringlist", "", { - validator: function(value) + validator: function (value) { return value == "all" || value.split(",").every(function (item) { return /^(addons|downloads|help|javascript|prefs|)$/.test(item); }); } @@ -639,7 +639,7 @@ liberator.Tabs = function () //{{{ // "buffer" is a string which matches the URL or title of a buffer, if it // is null, the last used string is used again - switchTo: function(buffer, allowNonUnique, count, reverse) + switchTo: function (buffer, allowNonUnique, count, reverse) { if (buffer == "") { diff --git a/content/util.js b/content/util.js index af6ea7be..8c2cc40a 100644 --- a/content/util.js +++ b/content/util.js @@ -247,7 +247,7 @@ liberator.util = { //{{{ }, // same as Firefox's readFromClipboard function, but needed for apps like Thunderbird - readFromClipboard: function() + readFromClipboard: function () { var url; try diff --git a/content/vimperator.js b/content/vimperator.js index 83b3ec7d..862c473c 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -37,56 +37,56 @@ liberator.config = { //{{{ dialogs: [ ["about", "About Firefox", - function() { openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], + function () { openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], ["addbookmark", "Add bookmark for the current page", - function() { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }], + function () { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }], ["addons", "Manage Add-ons", - function() { BrowserOpenAddonsMgr(); }], + function () { BrowserOpenAddonsMgr(); }], ["bookmarks", "List your bookmarks", - function() { openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }], + function () { openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }], ["checkupdates", "Check for updates", - function() { checkForUpdates(); }], + function () { checkForUpdates(); }], ["cleardata", "Clear private data", - function() { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }], + function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }], ["console", "JavaScript console", - function() { toJavaScriptConsole(); }], + function () { toJavaScriptConsole(); }], ["customizetoolbar", "Customize the Toolbar", - function() { BrowserCustomizeToolbar(); }], + function () { BrowserCustomizeToolbar(); }], ["dominspector", "DOM Inspector", - function() { inspectDOMDocument(content.document); }], + function () { inspectDOMDocument(content.document); }], ["downloads", "Manage Downloads", - function() { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }], + function () { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }], ["history", "List your history", - function() { openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }], + function () { openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }], ["import", "Import Preferences, Bookmarks, History, etc. from other browsers", - function() { BrowserImport(); }], + function () { BrowserImport(); }], ["openfile", "Open the file selector dialog", - function() { BrowserOpenFileWindow(); }], + function () { BrowserOpenFileWindow(); }], ["pageinfo", "Show information about the current page", - function() { BrowserPageInfo(); }], + function () { BrowserPageInfo(); }], ["pagesource", "View page source", - function() { BrowserViewSourceOfDocument(content.document); }], + function () { BrowserViewSourceOfDocument(content.document); }], ["places", "Places Organizer: Manage your bookmarks and history", - function() { PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS); }], + function () { PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS); }], ["preferences", "Show Firefox preferences dialog", - function() { openPreferences(); }], + function () { openPreferences(); }], ["printpreview", "Preview the page before printing", - function() { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }], + function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }], ["printsetup", "Setup the page size and orientation before printing", - function() { PrintUtils.showPageSetup(); }], + function () { PrintUtils.showPageSetup(); }], ["print", "Show print dialog", - function() { PrintUtils.print(); }], + function () { PrintUtils.print(); }], ["saveframe", "Save frame to disk", - function() { saveFrameDocument(); }], + function () { saveFrameDocument(); }], ["savepage", "Save page to disk", - function() { saveDocument(window.content.document); }], + function () { saveDocument(window.content.document); }], ["searchengines", "Manage installed search engines", - function() { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], + function () { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }], ["selectionsource", "View selection source", - function() { liberator.buffer.viewSelectionSource(); }] + function () { liberator.buffer.viewSelectionSource(); }] ], - init: function() + init: function () { function incrementURL(count) { @@ -152,7 +152,7 @@ liberator.config = { //{{{ liberator.mappings.add([liberator.modes.NORMAL], ["gh"], "Open homepage", - function() { BrowserHome(); }); + function () { BrowserHome(); }); liberator.mappings.add([liberator.modes.NORMAL], ["gH"], "Open homepage in a new tab",