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
|
// update our bookmark cache
|
||||||
var root = rdf_service.GetResource("NC:BookmarksRoot");
|
var root = rdf_service.GetResource("NC:BookmarksRoot");
|
||||||
bookmarks = new Array(); // also clear our bookmark cache
|
bookmarks = []; // also clear our bookmark cache
|
||||||
keywords = new Array();
|
keywords = [];
|
||||||
|
|
||||||
var bmarks = []; // here getAllChildren will store the bookmarks
|
var bmarks = []; // here getAllChildren will store the bookmarks
|
||||||
BookmarksUtils.getAllChildren(root, bmarks);
|
BookmarksUtils.getAllChildren(root, bmarks);
|
||||||
@@ -158,7 +158,7 @@ function Bookmarks() //{{{
|
|||||||
/* also ensures that each search engine has a vimperator-friendly alias */
|
/* also ensures that each search engine has a vimperator-friendly alias */
|
||||||
this.getSearchEngines = function()
|
this.getSearchEngines = function()
|
||||||
{
|
{
|
||||||
var search_engines = new Array();
|
var search_engines = [];
|
||||||
var firefox_engines = search_service.getVisibleEngines({ });
|
var firefox_engines = search_service.getVisibleEngines({ });
|
||||||
for (var i in firefox_engines)
|
for (var i in firefox_engines)
|
||||||
{
|
{
|
||||||
@@ -346,7 +346,7 @@ function History() //{{{
|
|||||||
|
|
||||||
function load()
|
function load()
|
||||||
{
|
{
|
||||||
history = new Array();
|
history = [];
|
||||||
|
|
||||||
var historytree = document.getElementById("hiddenHistoryTree");
|
var historytree = document.getElementById("hiddenHistoryTree");
|
||||||
if (!historytree)
|
if (!historytree)
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ vimperator.completion = (function() // {{{
|
|||||||
*/
|
*/
|
||||||
get_url_completions: function(filter, complete) //{{{
|
get_url_completions: function(filter, complete) //{{{
|
||||||
{
|
{
|
||||||
var completions = new Array();
|
var completions = [];
|
||||||
g_substrings = [];
|
g_substrings = [];
|
||||||
|
|
||||||
var cpt = complete || vimperator.options["complete"];
|
var cpt = complete || vimperator.options["complete"];
|
||||||
@@ -245,7 +245,7 @@ vimperator.completion = (function() // {{{
|
|||||||
|
|
||||||
get_file_completions: function(filter) //{{{
|
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 */
|
/* This is now also used as part of the url completion, so the substrings shouldn't be cleared for that case */
|
||||||
if (!arguments[1])
|
if (!arguments[1])
|
||||||
g_substrings = [];
|
g_substrings = [];
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ function Search() //{{{
|
|||||||
|
|
||||||
// Creates a default find state
|
// Creates a default find state
|
||||||
this.createInitialFindState = function() {
|
this.createInitialFindState = function() {
|
||||||
var state = new Array();
|
var state = [];
|
||||||
state["screenx"] = this.gWin.scrollX;
|
state["screenx"] = this.gWin.scrollX;
|
||||||
state["screeny"] = this.gWin.scrollY;
|
state["screeny"] = this.gWin.scrollY;
|
||||||
state["search-str"] = "";
|
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
|
// 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) {
|
this.addFindState = function(screenX, screenY, searchStr, wrapped, point, range, selection, direction) {
|
||||||
var state = new Array();
|
var state = [];
|
||||||
state["screenx"] = screenX;
|
state["screenx"] = screenX;
|
||||||
state["screeny"] = screenY;
|
state["screeny"] = screenY;
|
||||||
state["search-str"] = searchStr;
|
state["search-str"] = searchStr;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function Hints() //{{{
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!wins)
|
if (!wins)
|
||||||
wins = new Array();
|
wins = [];
|
||||||
|
|
||||||
win.winId = wins.length;
|
win.winId = wins.length;
|
||||||
wins.push(win);
|
wins.push(win);
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ function CommandLine() //{{{
|
|||||||
const HISTORY_SIZE = 500;
|
const HISTORY_SIZE = 500;
|
||||||
|
|
||||||
var completionlist = new InformationList("vimperator-completion", { min_items: 2, max_items: 10 });
|
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_index = UNINITIALIZED;
|
||||||
var history_start = "";
|
var history_start = "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user