Mass-replace global-scope let with var in Pale Moon and TychoAM

tag #155
This commit is contained in:
wolfbeast 2018-04-16 14:47:03 +02:00 committed by Roy Tam
commit d5b0bc88af
62 changed files with 120 additions and 119 deletions

View file

@ -104,7 +104,7 @@ const kPartialDownloadSuffix = ".part";
const kPrefBranch = Services.prefs.getBranch("browser.download.");
let PrefObserver = {
var PrefObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
getPref: function PO_getPref(name) {

View file

@ -4,7 +4,7 @@
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
let ContentAreaDownloadsView = {
var ContentAreaDownloadsView = {
init: function CADV_init() {
let view = new DownloadsPlacesView(document.getElementById("downloadsRichListBox"));
// Do not display the Places downloads in private windows

View file

@ -1603,7 +1603,7 @@ PlacesController.prototype = {
* the view that the item(s) have been dropped on was not necessarily active.
* Drop functions are passed the view that is being dropped on.
*/
let PlacesControllerDragHelper = {
var PlacesControllerDragHelper = {
/**
* DOM Element currently being dragged over
*/

View file

@ -1377,7 +1377,7 @@ var ViewMenu = {
}
}
let ContentArea = {
var ContentArea = {
_specialViews: new Map(),
init: function CA_init() {
@ -1511,7 +1511,7 @@ let ContentArea = {
}
};
let ContentTree = {
var ContentTree = {
init: function CT_init() {
this._view = document.getElementById("placeContent");
},

View file

@ -13,15 +13,15 @@ Cu.import("resource://gre/modules/AddonManager.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/ForgetAboutSite.jsm");
let gFaviconService = Cc["@mozilla.org/browser/favicon-service;1"].
var gFaviconService = Cc["@mozilla.org/browser/favicon-service;1"].
getService(Ci.nsIFaviconService);
let gPlacesDatabase = Cc["@mozilla.org/browser/nav-history-service;1"].
var gPlacesDatabase = Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsPIPlacesDatabase).
DBConnection.
clone(true);
let gSitesStmt = gPlacesDatabase.createAsyncStatement(
var gSitesStmt = gPlacesDatabase.createAsyncStatement(
"SELECT get_unreversed_host(rev_host) AS host " +
"FROM moz_places " +
"WHERE rev_host > '.' " +
@ -30,12 +30,12 @@ let gSitesStmt = gPlacesDatabase.createAsyncStatement(
"ORDER BY MAX(frecency) DESC " +
"LIMIT :limit");
let gVisitStmt = gPlacesDatabase.createAsyncStatement(
var gVisitStmt = gPlacesDatabase.createAsyncStatement(
"SELECT SUM(visit_count) AS count " +
"FROM moz_places " +
"WHERE rev_host = :rev_host");
let gFlash = {
var gFlash = {
name: "Shockwave Flash",
betterName: "Adobe Flash",
type: "application/x-shockwave-flash",
@ -290,7 +290,7 @@ Site.prototype = {
*
* Inspired by pageinfo/permissions.js
*/
let PermissionDefaults = {
var PermissionDefaults = {
UNKNOWN: Ci.nsIPermissionManager.UNKNOWN_ACTION, // 0
ALLOW: Ci.nsIPermissionManager.ALLOW_ACTION, // 1
DENY: Ci.nsIPermissionManager.DENY_ACTION, // 2
@ -449,7 +449,7 @@ let PermissionDefaults = {
/**
* AboutPermissions manages the about:permissions page.
*/
let AboutPermissions = {
var AboutPermissions = {
/**
* Maximum number of sites to return from the places database.
*/

View file

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let gSanitizeDialog = Object.freeze({
var gSanitizeDialog = Object.freeze({
onClearHistoryChanged: function () {
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
let historyPref = document.getElementById("privacy.clearOnShutdown.history");

View file

@ -9,7 +9,7 @@ const PAGE_NO_ACCOUNT = 0;
const PAGE_HAS_ACCOUNT = 1;
const PAGE_NEEDS_UPDATE = 2;
let gSyncPane = {
var gSyncPane = {
_stringBundle: null,
prefArray: ["engine.bookmarks", "engine.passwords", "engine.prefs",
"engine.tabs", "engine.history"],

View file

@ -38,7 +38,7 @@ this.SessionStorage = {
Object.freeze(SessionStorage);
let DomStorage = {
var DomStorage = {
/**
* Reads all session storage data from the given docShell.
* @param aDocShell
@ -142,7 +142,7 @@ let DomStorage = {
}
};
let History = {
var History = {
/**
* Returns a given history entry's URI.
* @param aHistory

View file

@ -88,7 +88,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager",
// retrieved from a given docShell if not already collected before.
// This is made so they're automatically in sync with all nsIDocShell.allow*
// properties.
let gDocShellCapabilities = (function () {
var gDocShellCapabilities = (function () {
let caps;
return docShell => {
@ -247,7 +247,7 @@ this.SessionStore = {
// Freeze the SessionStore object. We don't want anyone to modify it.
Object.freeze(SessionStore);
let SessionStoreInternal = {
var SessionStoreInternal = {
QueryInterface: XPCOMUtils.generateQI([
Ci.nsIDOMEventListener,
Ci.nsIObserver,
@ -4471,7 +4471,7 @@ let SessionStoreInternal = {
* pinned, visible and hidden tabs in that and FIFO order. Hidden tabs are only
* restored with restore_hidden_tabs=true.
*/
let TabRestoreQueue = {
var TabRestoreQueue = {
// The separate buckets used to store tabs.
tabs: {priority: [], visible: [], hidden: []},
@ -4608,7 +4608,7 @@ let TabRestoreQueue = {
// A map storing a closed window's state data until it goes aways (is GC'ed).
// This ensures that API clients can still read (but not write) states of
// windows they still hold a reference to but we don't.
let DyingWindowCache = {
var DyingWindowCache = {
_data: new WeakMap(),
has: function (window) {
@ -4631,7 +4631,7 @@ let DyingWindowCache = {
// A set of tab attributes to persist. We will read a given list of tab
// attributes when collecting tab data and will re-set those attributes when
// the given tab data is restored to a new tab.
let TabAttributes = {
var TabAttributes = {
_attrs: new Set(),
// We never want to directly read or write those attributes.
@ -4677,7 +4677,7 @@ let TabAttributes = {
// This is used to help meter the number of restoring tabs. This is the control
// point for telling the next tab to restore. It gets attached to each gBrowser
// via gBrowser.addTabsProgressListener
let gRestoreTabsProgressListener = {
var gRestoreTabsProgressListener = {
onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
// Ignore state changes on browsers that we've already restored and state
// changes that aren't applicable.

View file

@ -130,7 +130,7 @@ const TaskUtils = {
}
};
let SessionFileInternal = {
var SessionFileInternal = {
/**
* A promise fulfilled once initialization is complete
*/

View file

@ -50,7 +50,7 @@ function debug(aMsg) {
Services.console.logStringMessage(aMsg);
}
let gOnceInitializedDeferred = Promise.defer();
var gOnceInitializedDeferred = Promise.defer();
/* :::::::: The Service ::::::::::::::: */

View file

@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WindowsRegistry",
/**
* Internal functionality to save and restore the docShell.allow* properties.
*/
let ShellServiceInternal = {
var ShellServiceInternal = {
/**
* Used to determine whether or not to offer "Set as desktop background"
* functionality. Even if shell service is available it is not