mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 20:17:58 +01:00
change remaining uses of the Array() constructor in array initializations to
literals
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -58,7 +58,7 @@ function Hints() //{{{
|
||||
else
|
||||
{
|
||||
if (!wins)
|
||||
wins = new Array();
|
||||
wins = [];
|
||||
|
||||
win.winId = wins.length;
|
||||
wins.push(win);
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user