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

change remaining uses of the Array() constructor in array initializations to

literals
This commit is contained in:
Doug Kearns
2007-08-11 12:46:13 +00:00
parent 101bcf025e
commit 5b6b78d815
6 changed files with 13 additions and 13 deletions

View File

@@ -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)

View File

@@ -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 = [];

View File

@@ -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<C-f>" to pass

View File

@@ -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;

View File

@@ -58,7 +58,7 @@ function Hints() //{{{
else
{
if (!wins)
wins = new Array();
wins = [];
win.winId = wins.length;
wins.push(win);

View File

@@ -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 = "";