diff --git a/chrome/content/vimperator/bookmarks.js b/chrome/content/vimperator/bookmarks.js index 521a7e44..75b9f5e3 100644 --- a/chrome/content/vimperator/bookmarks.js +++ b/chrome/content/vimperator/bookmarks.js @@ -51,8 +51,8 @@ function Bookmarks() //{{{ { // update our bookmark cache var root = rdf_service.GetResource("NC:BookmarksRoot"); - bookmarks = new Array(); // also clear our bookmark cache - keywords = new Array(); + bookmarks = []; // also clear our bookmark cache + keywords = []; var bmarks = []; // here getAllChildren will store the bookmarks BookmarksUtils.getAllChildren(root, bmarks); @@ -158,7 +158,7 @@ function Bookmarks() //{{{ /* also ensures that each search engine has a vimperator-friendly alias */ this.getSearchEngines = function() { - var search_engines = new Array(); + var search_engines = []; var firefox_engines = search_service.getVisibleEngines({ }); for (var i in firefox_engines) { @@ -346,7 +346,7 @@ function History() //{{{ function load() { - history = new Array(); + history = []; var historytree = document.getElementById("hiddenHistoryTree"); if (!historytree) diff --git a/chrome/content/vimperator/completion.js b/chrome/content/vimperator/completion.js index c9d09c32..2c7c4d8b 100644 --- a/chrome/content/vimperator/completion.js +++ b/chrome/content/vimperator/completion.js @@ -198,7 +198,7 @@ vimperator.completion = (function() // {{{ */ get_url_completions: function(filter, complete) //{{{ { - var completions = new Array(); + var completions = []; g_substrings = []; var cpt = complete || vimperator.options["complete"]; @@ -245,7 +245,7 @@ vimperator.completion = (function() // {{{ get_file_completions: function(filter) //{{{ { - //var completions = new Array(); + //var completions = []; /* This is now also used as part of the url completion, so the substrings shouldn't be cleared for that case */ if (!arguments[1]) g_substrings = []; diff --git a/chrome/content/vimperator/events.js b/chrome/content/vimperator/events.js index 48c71192..a27095b3 100644 --- a/chrome/content/vimperator/events.js +++ b/chrome/content/vimperator/events.js @@ -78,7 +78,7 @@ function Events() //{{{ // TODO: use this table also for KeyboardEvent.prototype.toString var keyTable = [ - [ KeyEvent.DOM_VK_ESCAPE, ["Esc", "Escape"] ], + [ KeyEvent.DOM_VK_ESCAPE, ["Esc", "Escape"] ], [ KeyEvent.DOM_VK_LEFT_SHIFT, ["<"] ], [ KeyEvent.DOM_VK_RIGHT_SHIFT, [">"] ], [ KeyEvent.DOM_VK_RETURN, ["Return", "CR", "Enter"] ], @@ -207,7 +207,7 @@ function Events() //{{{ } // This method pushes keys into the event queue from vimperator - // it is similar to vim's feedkeys() method, but cannot cope with + // it is similar to vim's feedkeys() method, but cannot cope with // 2 partially feeded strings, you have to feed one parsable string // // @param keys: a string like "2" to pass diff --git a/chrome/content/vimperator/find.js b/chrome/content/vimperator/find.js index c75f54c0..f5295dab 100644 --- a/chrome/content/vimperator/find.js +++ b/chrome/content/vimperator/find.js @@ -378,7 +378,7 @@ function Search() //{{{ // Creates a default find state this.createInitialFindState = function() { - var state = new Array(); + var state = []; state["screenx"] = this.gWin.scrollX; state["screeny"] = this.gWin.scrollY; state["search-str"] = ""; @@ -411,7 +411,7 @@ function Search() //{{{ // Adds a find state to the stack of such states. This is done every time a find is successful this.addFindState = function(screenX, screenY, searchStr, wrapped, point, range, selection, direction) { - var state = new Array(); + var state = []; state["screenx"] = screenX; state["screeny"] = screenY; state["search-str"] = searchStr; diff --git a/chrome/content/vimperator/hints.js b/chrome/content/vimperator/hints.js index 0022e4aa..21b4894e 100644 --- a/chrome/content/vimperator/hints.js +++ b/chrome/content/vimperator/hints.js @@ -58,7 +58,7 @@ function Hints() //{{{ else { if (!wins) - wins = new Array(); + wins = []; win.winId = wins.length; wins.push(win); diff --git a/chrome/content/vimperator/ui.js b/chrome/content/vimperator/ui.js index 91da9fed..d5b5420b 100644 --- a/chrome/content/vimperator/ui.js +++ b/chrome/content/vimperator/ui.js @@ -42,9 +42,9 @@ function CommandLine() //{{{ const HISTORY_SIZE = 500; var completionlist = new InformationList("vimperator-completion", { min_items: 2, max_items: 10 }); - var completions = new Array(); + var completions = []; - var history = new Array(); + var history = []; var history_index = UNINITIALIZED; var history_start = "";