Browse Source

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

tag #155
pull/1/head
wolfbeast 4 years ago committed by Roy Tam
parent
commit
d5b0bc88af
  1. 4
      application/palemoon/base/content/abouthome/aboutHome.js
  2. 4
      application/palemoon/base/content/browser-addons.js
  3. 4
      application/palemoon/base/content/browser-gestureSupport.js
  4. 4
      application/palemoon/base/content/browser-places.js
  5. 2
      application/palemoon/base/content/browser-syncui.js
  6. 2
      application/palemoon/base/content/browser-thumbnails.js
  7. 2
      application/palemoon/base/content/browser-webrtcUI.js
  8. 7
      application/palemoon/base/content/browser.js
  9. 2
      application/palemoon/base/content/newtab/drag.js
  10. 2
      application/palemoon/base/content/newtab/dragDataHelper.js
  11. 2
      application/palemoon/base/content/newtab/drop.js
  12. 2
      application/palemoon/base/content/newtab/dropPreview.js
  13. 2
      application/palemoon/base/content/newtab/dropTargetShim.js
  14. 2
      application/palemoon/base/content/newtab/grid.js
  15. 2
      application/palemoon/base/content/newtab/newTab.js
  16. 2
      application/palemoon/base/content/newtab/page.js
  17. 2
      application/palemoon/base/content/newtab/transformations.js
  18. 2
      application/palemoon/base/content/newtab/undo.js
  19. 2
      application/palemoon/base/content/newtab/updater.js
  20. 4
      application/palemoon/base/content/openLocation.js
  21. 2
      application/palemoon/base/content/sync/aboutSyncTabs.js
  22. 2
      application/palemoon/base/content/sync/addDevice.js
  23. 2
      application/palemoon/base/content/sync/genericChange.js
  24. 4
      application/palemoon/base/content/sync/progress.js
  25. 4
      application/palemoon/base/content/sync/quota.js
  26. 2
      application/palemoon/base/content/sync/utils.js
  27. 2
      application/palemoon/components/downloads/DownloadsCommon.jsm
  28. 2
      application/palemoon/components/downloads/content/contentAreaDownloadsView.js
  29. 2
      application/palemoon/components/places/content/controller.js
  30. 4
      application/palemoon/components/places/content/places.js
  31. 14
      application/palemoon/components/preferences/aboutPermissions.js
  32. 2
      application/palemoon/components/preferences/sanitize.js
  33. 2
      application/palemoon/components/preferences/sync.js
  34. 4
      application/palemoon/components/sessionstore/SessionStorage.jsm
  35. 12
      application/palemoon/components/sessionstore/SessionStore.jsm
  36. 2
      application/palemoon/components/sessionstore/_SessionFile.jsm
  37. 2
      application/palemoon/components/sessionstore/nsSessionStartup.js
  38. 2
      application/palemoon/components/shell/ShellService.jsm
  39. 8
      application/palemoon/modules/BrowserNewTabPreloader.jsm
  40. 16
      application/palemoon/modules/FormSubmitObserver.jsm
  41. 8
      application/palemoon/modules/FormValidationHandler.jsm
  42. 8
      application/palemoon/modules/NetworkPrioritizer.jsm
  43. 4
      application/palemoon/modules/PopupNotifications.jsm
  44. 2
      application/palemoon/modules/SharedFrame.jsm
  45. 8
      application/palemoon/modules/openLocationLastURL.jsm
  46. 2
      application/palemoon/modules/promise.js
  47. 6
      toolkit/mozapps/extensions/AddonManager.jsm
  48. 6
      toolkit/mozapps/extensions/DeferredSave.jsm
  49. 4
      toolkit/mozapps/extensions/addonManager.js
  50. 2
      toolkit/mozapps/extensions/amInstallTrigger.js
  51. 2
      toolkit/mozapps/extensions/amWebInstallListener.js
  52. 2
      toolkit/mozapps/extensions/content/extensions.js
  53. 4
      toolkit/mozapps/extensions/content/update.js
  54. 4
      toolkit/mozapps/extensions/internal/AddonRepository.jsm
  55. 2
      toolkit/mozapps/extensions/internal/AddonRepository_SQLiteMigrator.jsm
  56. 2
      toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
  57. 4
      toolkit/mozapps/extensions/internal/Content.js
  58. 8
      toolkit/mozapps/extensions/internal/GMPProvider.jsm
  59. 8
      toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm
  60. 2
      toolkit/mozapps/extensions/internal/PluginProvider.jsm
  61. 4
      toolkit/mozapps/extensions/internal/XPIProvider.jsm
  62. 2
      toolkit/mozapps/extensions/internal/XPIProviderUtils.js

4
application/palemoon/base/content/abouthome/aboutHome.js

@ -234,8 +234,8 @@ const SEARCH_ENGINES = {
};
// This global tracks if the page has been set up before, to prevent double inits
let gInitialized = false;
let gObserver = new MutationObserver(function (mutations) {
var gInitialized = false;
var gObserver = new MutationObserver(function (mutations) {
for (let mutation of mutations) {
if (mutation.attributeName == "searchEngineURL") {
setupSearchEngine();

4
application/palemoon/base/content/browser-addons.js

@ -226,7 +226,7 @@ const gXPInstallObserver = {
* - If an add-on was installed, incrementing the count, show the bar.
* - If an add-on was uninstalled, and no more items are left, hide the bar.
*/
let AddonsMgrListener = {
var AddonsMgrListener = {
get addonBar() document.getElementById("addon-bar"),
get statusBar() document.getElementById("status-bar"),
getAddonBarItemCount: function() {
@ -461,7 +461,7 @@ var LightWeightThemeWebInstaller = {
/*
* Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
*/
let LightweightThemeListener = {
var LightweightThemeListener = {
_modifiedStyles: [],
init: function () {

4
application/palemoon/base/content/browser-gestureSupport.js

@ -13,7 +13,7 @@
// chrome-only, we must listen for the simple gesture events during
// the capturing phase and call stopPropagation on every event.
let gGestureSupport = {
var gGestureSupport = {
_currentRotation: 0,
_lastRotateDelta: 0,
_rotateMomentumThreshold: .75,
@ -532,7 +532,7 @@ let gGestureSupport = {
};
// History Swipe Animation Support (bug 678392)
let gHistorySwipeAnimation = {
var gHistorySwipeAnimation = {
active: false,
isLTR: false,

4
application/palemoon/base/content/browser-places.js

@ -959,7 +959,7 @@ var PlacesMenuDNDHandler = {
* This object handles the initialization and uninitialization of the bookmarks
* toolbar.
*/
let PlacesToolbarHelper = {
var PlacesToolbarHelper = {
_place: "place:folder=TOOLBAR",
get _viewElt() {
@ -1006,7 +1006,7 @@ let PlacesToolbarHelper = {
* menu button.
*/
let BookmarkingUI = {
var BookmarkingUI = {
get button() {
if (!this._button) {
this._button = document.getElementById("bookmarks-menu-button");

2
application/palemoon/base/content/browser-syncui.js

@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// gSyncUI handles updating the tools menu
let gSyncUI = {
var gSyncUI = {
_obs: ["weave:service:sync:start",
"weave:service:sync:delayed",
"weave:service:quota:remaining",

2
application/palemoon/base/content/browser-thumbnails.js

@ -7,7 +7,7 @@
/**
* Keeps thumbnails of open web pages up-to-date.
*/
let gBrowserThumbnails = {
var gBrowserThumbnails = {
/**
* Pref that controls whether we can store SSL content on disk
*/

2
application/palemoon/base/content/browser-webrtcUI.js

@ -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 WebrtcIndicator = {
var WebrtcIndicator = {
init: function () {
let temp = {};
Cu.import("resource:///modules/webrtcUI.jsm", temp);

7
application/palemoon/base/content/browser.js

@ -2329,7 +2329,7 @@ function BrowserOnAboutPageLoad(doc) {
/**
* Handle command events bubbling up from error page content
*/
let BrowserOnClick = {
var BrowserOnClick = {
handleEvent: function BrowserOnClick_handleEvent(aEvent) {
if (!aEvent.isTrusted || // Don't trust synthetic events
aEvent.button == 2 || aEvent.target.localName != "button") {
@ -6998,7 +6998,8 @@ function focusNextFrame(event) {
if (element.ownerDocument == document)
focusAndSelectUrlBar();
}
let BrowserChromeTest = {
var BrowserChromeTest = {
_cb: null,
_ready: false,
markAsReady: function () {
@ -7016,7 +7017,7 @@ let BrowserChromeTest = {
}
};
let ToolbarIconColor = {
var ToolbarIconColor = {
init: function () {
this._initialized = true;

2
application/palemoon/base/content/newtab/drag.js

@ -7,7 +7,7 @@
/**
* This singleton implements site dragging functionality.
*/
let gDrag = {
var gDrag = {
/**
* The site offset to the drag start point.
*/

2
application/palemoon/base/content/newtab/dragDataHelper.js

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#endif
let gDragDataHelper = {
var gDragDataHelper = {
get mimeType() {
return "text/x-moz-url";
},

2
application/palemoon/base/content/newtab/drop.js

@ -11,7 +11,7 @@ const DELAY_REARRANGE_MS = 100;
/**
* This singleton implements site dropping functionality.
*/
let gDrop = {
var gDrop = {
/**
* The last drop target.
*/

2
application/palemoon/base/content/newtab/dropPreview.js

@ -9,7 +9,7 @@
* indicate the transformation that results from dropping a cell at a certain
* position.
*/
let gDropPreview = {
var gDropPreview = {
/**
* Rearranges the sites currently contained in the grid when a site would be
* dropped onto the given cell.

2
application/palemoon/base/content/newtab/dropTargetShim.js

@ -9,7 +9,7 @@
* the default DnD target detection relies on the cursor's position. We want
* to pick a drop target based on the dragged site's position.
*/
let gDropTargetShim = {
var gDropTargetShim = {
/**
* Cache for the position of all cells, cleaned after drag finished.
*/

2
application/palemoon/base/content/newtab/grid.js

@ -7,7 +7,7 @@
/**
* This singleton represents the grid that contains all sites.
*/
let gGrid = {
var gGrid = {
/**
* The DOM node of the grid.
*/

2
application/palemoon/base/content/newtab/newTab.js

@ -18,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Rect",
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
let {
var {
links: gLinks,
allPages: gAllPages,
linkChecker: gLinkChecker,

2
application/palemoon/base/content/newtab/page.js

@ -8,7 +8,7 @@
* This singleton represents the whole 'New Tab Page' and takes care of
* initializing all its components.
*/
let gPage = {
var gPage = {
/**
* Initializes the page.
*/

2
application/palemoon/base/content/newtab/transformations.js

@ -9,7 +9,7 @@
* in the DOM and by showing or hiding the node. It additionally provides
* convenience methods to work with a site's DOM node.
*/
let gTransformation = {
var gTransformation = {
/**
* Returns the width of the left and top border of a cell. We need to take it
* into account when measuring and comparing site and cell positions.

2
application/palemoon/base/content/newtab/undo.js

@ -8,7 +8,7 @@
* Dialog allowing to undo the removal of single site or to completely restore
* the grid's original state.
*/
let gUndoDialog = {
var gUndoDialog = {
/**
* The undo dialog's timeout in miliseconds.
*/

2
application/palemoon/base/content/newtab/updater.js

@ -8,7 +8,7 @@
* This singleton provides functionality to update the current grid to a new
* set of pinned and blocked sites. It adds, moves and removes sites.
*/
let gUpdater = {
var gUpdater = {
/**
* Updates the current grid according to its pinned and blocked sites.
* This removes old, moves existing and creates new sites to fill gaps.

4
application/palemoon/base/content/openLocation.js

@ -7,7 +7,7 @@
var browser;
var dialog = {};
var pref = null;
let openLocationModule = {};
var openLocationModule = {};
try {
pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
@ -16,7 +16,7 @@ try {
}
Components.utils.import("resource:///modules/openLocationLastURL.jsm", openLocationModule);
let gOpenLocationLastURL = new openLocationModule.OpenLocationLastURL(window.opener);
var gOpenLocationLastURL = new openLocationModule.OpenLocationLastURL(window.opener);
function onLoad()
{

2
application/palemoon/base/content/sync/aboutSyncTabs.js

@ -11,7 +11,7 @@ Cu.import("resource://gre/modules/PlacesUtils.jsm", this);
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
let RemoteTabViewer = {
var RemoteTabViewer = {
_tabsList: null,
init: function () {

2
application/palemoon/base/content/sync/addDevice.js

@ -15,7 +15,7 @@ const ADD_DEVICE_PAGE = 0;
const SYNC_KEY_PAGE = 1;
const DEVICE_CONNECTED_PAGE = 2;
let gSyncAddDevice = {
var gSyncAddDevice = {
init: function init() {
this.pin1.setAttribute("maxlength", PIN_PART_LENGTH);

2
application/palemoon/base/content/sync/genericChange.js

@ -8,7 +8,7 @@ const Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");
let Change = {
var Change = {
_dialog: null,
_dialogType: null,
_status: null,

4
application/palemoon/base/content/sync/progress.js

@ -6,8 +6,8 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://services-sync/main.js");
let gProgressBar;
let gCounter = 0;
var gProgressBar;
var gCounter = 0;
function onLoad(event) {
Services.obs.addObserver(onEngineSync, "weave:engine:sync:finish", false);

4
application/palemoon/base/content/sync/quota.js

@ -10,7 +10,7 @@ const Cu = Components.utils;
Cu.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/DownloadUtils.jsm");
let gSyncQuota = {
var gSyncQuota = {
init: function init() {
this.bundle = document.getElementById("quotaStrings");
@ -86,7 +86,7 @@ let gSyncQuota = {
};
let gUsageTreeView = {
var gUsageTreeView = {
_ignored: {keys: true,
meta: true,

2
application/palemoon/base/content/sync/utils.js

@ -8,7 +8,7 @@
const PERMISSIONS_RWUSR = 0x180;
// Weave should always exist before before this file gets included.
let gSyncUtils = {
var gSyncUtils = {
get bundle() {
delete this.bundle;
return this.bundle = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");

2
application/palemoon/components/downloads/DownloadsCommon.jsm

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

2
application/palemoon/components/downloads/content/contentAreaDownloadsView.js

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

2
application/palemoon/components/places/content/controller.js

@ -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
*/

4
application/palemoon/components/places/content/places.js

@ -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");
},

14
application/palemoon/components/preferences/aboutPermissions.js

@ -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.
*/

2
application/palemoon/components/preferences/sanitize.js

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

2
application/palemoon/components/preferences/sync.js

@ -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"],

4
application/palemoon/components/sessionstore/SessionStorage.jsm

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

12
application/palemoon/components/sessionstore/SessionStore.jsm

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

2
application/palemoon/components/sessionstore/_SessionFile.jsm

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

2
application/palemoon/components/sessionstore/nsSessionStartup.js

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

2
application/palemoon/components/shell/ShellService.jsm

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

8
application/palemoon/modules/BrowserNewTabPreloader.jsm

@ -79,7 +79,7 @@ this.BrowserNewTabPreloader = {
Object.freeze(BrowserNewTabPreloader);
let Initializer = {
var Initializer = {
_timer: null,
_observing: false,
@ -120,7 +120,7 @@ let Initializer = {
}
};
let Preferences = {
var Preferences = {
_enabled: null,
_branch: null,
@ -157,7 +157,7 @@ let Preferences = {
},
};
let HiddenBrowsers = {
var HiddenBrowsers = {
_browsers: null,
_updateTimer: null,
@ -379,7 +379,7 @@ HiddenBrowser.prototype = {
}
};
let HostFrame = {
var HostFrame = {
_frame: null,
_deferred: null,

16
application/palemoon/modules/FormSubmitObserver.jsm

@ -9,14 +9,14 @@
"use strict";
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
let HTMLInputElement = Ci.nsIDOMHTMLInputElement;
let HTMLTextAreaElement = Ci.nsIDOMHTMLTextAreaElement;
let HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
let HTMLButtonElement = Ci.nsIDOMHTMLButtonElement;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var HTMLInputElement = Ci.nsIDOMHTMLInputElement;
var HTMLTextAreaElement = Ci.nsIDOMHTMLTextAreaElement;
var HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
var HTMLButtonElement = Ci.nsIDOMHTMLButtonElement;
this.EXPORTED_SYMBOLS = [ "FormSubmitObserver" ];

8
application/palemoon/modules/FormValidationHandler.jsm

@ -8,15 +8,15 @@
"use strict";
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
this.EXPORTED_SYMBOLS = [ "FormValidationHandler" ];
Cu.import("resource://gre/modules/Services.jsm");
let FormValidationHandler =
var FormValidationHandler =
{
_panel: null,
_anchor: null,

8
application/palemoon/modules/NetworkPrioritizer.jsm

@ -34,8 +34,8 @@ const PRIORITY_DELTA = -10;
// Variables
let _lastFocusedWindow = null;
let _windows = [];
var _lastFocusedWindow = null;
var _windows = [];
// Exported symbol
@ -64,7 +64,7 @@ function _handleEvent(aEvent) {
// Methods that impact a browser. Put into single object for organization.
let BrowserHelper = {
var BrowserHelper = {
onOpen: function NP_BH_onOpen(aBrowser) {
// If the tab is in the focused window, leave priority as it is
if (aBrowser.ownerDocument.defaultView != _lastFocusedWindow)
@ -91,7 +91,7 @@ let BrowserHelper = {
// Methods that impact a window. Put into single object for organization.
let WindowHelper = {
var WindowHelper = {
addWindow: function NP_WH_addWindow(aWindow) {
// Build internal data object
_windows.push({ window: aWindow, lastSelectedBrowser: null });

4
application/palemoon/modules/PopupNotifications.jsm

@ -18,8 +18,8 @@ const ICON_ATTRIBUTE_SHOWING = "showing";
const PREF_SECURITY_DELAY = "security.notification_enable_delay";
let popupNotificationsMap = new WeakMap();
let gNotificationParents = new WeakMap;
var popupNotificationsMap = new WeakMap();
var gNotificationParents = new WeakMap;
function getAnchorFromBrowser(aBrowser) {
let anchor = aBrowser.getAttribute("popupnotificationanchor") ||

2
application/palemoon/modules/SharedFrame.jsm

@ -18,7 +18,7 @@ const Cu = Components.utils;
* when another one of the placeholder is meant to be displayed.
* */
let Frames = new Map();
var Frames = new Map();
/**
* The Frames map is the main data structure that holds information

8
application/palemoon/modules/openLocationLastURL.jsm

@ -10,11 +10,11 @@ Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
this.EXPORTED_SYMBOLS = [ "OpenLocationLastURL" ];
let prefSvc = Components.classes["@mozilla.org/preferences-service;1"]
var prefSvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
let gOpenLocationLastURLData = "";
var gOpenLocationLastURLData = "";
let observer = {
var observer = {
QueryInterface: function (aIID) {
if (aIID.equals(Components.interfaces.nsIObserver) ||
aIID.equals(Components.interfaces.nsISupports) ||
@ -35,7 +35,7 @@ let observer = {
}
};
let os = Components.classes["@mozilla.org/observer-service;1"]
var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
os.addObserver(observer, "last-pb-context-exited", true);
os.addObserver(observer, "browser:purge-session-history", true);

2
application/palemoon/modules/promise.js

@ -24,7 +24,7 @@ module.metadata = {
'stability': 'unstable'
};
let promised = (function() {
var promised = (function() {
// Note: Define shortcuts and utility functions here in order to avoid
// slower property accesses and unnecessary closure creations on each
// call of this popular function.

6
toolkit/mozapps/extensions/AddonManager.jsm

@ -88,9 +88,9 @@ Cu.import("resource://gre/modules/Log.jsm");
// Configure a logger at the parent 'addons' level to format
// messages for all the modules under addons.*
const PARENT_LOGGER_ID = "addons";
let parentLogger = Log.repository.getLogger(PARENT_LOGGER_ID);
var parentLogger = Log.repository.getLogger(PARENT_LOGGER_ID);
parentLogger.level = Log.Level.Warn;
let formatter = new Log.BasicFormatter();
var formatter = new Log.BasicFormatter();
// Set parent logger (and its children) to append to
// the Javascript section of the Browser Console
parentLogger.addAppender(new Log.ConsoleAppender(formatter));
@ -101,7 +101,7 @@ parentLogger.addAppender(new Log.DumpAppender(formatter));
// Create a new logger (child of 'addons' logger)
// for use by the Addons Manager
const LOGGER_ID = "addons.manager";
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
// Provide the ability to enable/disable logging
// messages at runtime.

6
toolkit/mozapps/extensions/DeferredSave.jsm

@ -12,7 +12,7 @@ Cu.import("resource://gre/modules/osfile.jsm");
Cu.import("resource://gre/modules/Promise.jsm");
// Make it possible to mock out timers for testing
let MakeTimer = () => Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
var MakeTimer = () => Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
this.EXPORTED_SYMBOLS = ["DeferredSave"];
@ -23,9 +23,9 @@ Cu.import("resource://gre/modules/Log.jsm");
//Configure a logger at the parent 'DeferredSave' level to format
//messages for all the modules under DeferredSave.*
const DEFERREDSAVE_PARENT_LOGGER_ID = "DeferredSave";
let parentLogger = Log.repository.getLogger(DEFERREDSAVE_PARENT_LOGGER_ID);
var parentLogger = Log.repository.getLogger(DEFERREDSAVE_PARENT_LOGGER_ID);
parentLogger.level = Log.Level.Warn;
let formatter = new Log.BasicFormatter();
var formatter = new Log.BasicFormatter();
//Set parent logger (and its children) to append to
//the Javascript section of the Browser Console
parentLogger.addAppender(new Log.ConsoleAppender(formatter));

4
toolkit/mozapps/extensions/addonManager.js

@ -31,9 +31,9 @@ const CHILD_SCRIPT = "resource://gre/modules/addons/Content.js";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
let gSingleton = null;
var gSingleton = null;
let gParentMM = null;
var gParentMM = null;
function amManager() {

2
toolkit/mozapps/extensions/amInstallTrigger.js

@ -18,7 +18,7 @@ const MSG_INSTALL_ADDONS = "WebInstallerInstallAddonsFromWebpage";
const MSG_INSTALL_CALLBACK = "WebInstallerInstallCallback";
let log = Log.repository.getLogger("AddonManager.InstallTrigger");
var log = Log.repository.getLogger("AddonManager.InstallTrigger");
log.level = Log.Level[Preferences.get("extensions.logging.enabled", false) ? "Warn" : "Trace"];
function CallbackObject(id, callback, urls, mediator) {

2
toolkit/mozapps/extensions/amWebInstallListener.js

@ -37,7 +37,7 @@ const LOGGER_ID = "addons.weblistener";
// Create a new logger for use by the Addons Web Listener
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
function notifyObservers(aTopic, aBrowser, aUri, aInstalls) {
let info = {

2
toolkit/mozapps/extensions/content/extensions.js

@ -2456,7 +2456,7 @@ var gSearchView = {
this._allResultsLink.setAttribute("href",
AddonRepository.getSearchURL(this._lastQuery));
this._allResultsLink.hidden = false;
},
},
updateListAttributes: function gSearchView_updateListAttributes() {
var item = this._listBox.querySelector("richlistitem[remote='true'][first]");

4
toolkit/mozapps/extensions/content/update.js

@ -22,7 +22,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository", "resource://gre/modul
XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Log", "resource://gre/modules/Log.jsm");
let logger = null;
var logger = null;
var gUpdateWizard = {
// When synchronizing app compatibility info this contains all installed
@ -169,7 +169,7 @@ var gOfflinePage = {
}
// Addon listener to count addons enabled/disabled by metadata checks
let listener = {
var listener = {
onDisabled: function listener_onDisabled(aAddon) {
gUpdateWizard.affectedAddonIDs.add(aAddon.id);
gUpdateWizard.metadataDisabled++;

4
toolkit/mozapps/extensions/internal/AddonRepository.jsm

@ -72,7 +72,7 @@ const LOGGER_ID = "addons.repository";
// Create a new logger for use by the Addons Repository
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
// A map between XML keys to AddonSearchResult keys for string values
// that require no extra parsing from XML
@ -101,7 +101,7 @@ const INTEGER_KEY_MAP = {
};
// Wrap the XHR factory so that tests can override with a mock
let XHRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttprequest;1",
var XHRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttprequest;1",
"nsIXMLHttpRequest");
function convertHTMLToPlainText(html) {

2
toolkit/mozapps/extensions/internal/AddonRepository_SQLiteMigrator.jsm

@ -30,7 +30,7 @@ const LOGGER_ID = "addons.repository.sqlmigrator";
// Create a new logger for use by the Addons Repository SQL Migrator
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
this.EXPORTED_SYMBOLS = ["AddonRepository_SQLiteMigrator"];

2
toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm

@ -52,7 +52,7 @@ const LOGGER_ID = "addons.update-checker";
// Create a new logger for use by the Addons Update Checker
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
/**
* A serialisation method for RDF data that produces an identical string

4
toolkit/mozapps/extensions/internal/Content.js

@ -8,9 +8,9 @@
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
let {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
var {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
let nsIFile = Components.Constructor("@mozilla.org/file/local;1", "nsIFile",
var nsIFile = Components.Constructor("@mozilla.org/file/local;1", "nsIFile",
"initWithPath");
const MSG_JAR_FLUSH = "AddonJarFlush";

8
toolkit/mozapps/extensions/internal/GMPProvider.jsm

@ -64,11 +64,11 @@ XPCOMUtils.defineLazyGetter(this, "pluginsBundle",
XPCOMUtils.defineLazyGetter(this, "gmpService",
() => Cc["@mozilla.org/gecko-media-plugin-service;1"].getService(Ci.mozIGeckoMediaPluginChromeService));
let messageManager = Cc["@mozilla.org/globalmessagemanager;1"]
var messageManager = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);
let gLogger;
let gLogAppenderDump = null;
var gLogger;
var gLogAppenderDump = null;
function configureLogging() {
if (!gLogger) {
@ -443,7 +443,7 @@ GMPWrapper.prototype = {
},
};
let GMPProvider = {
var GMPProvider = {
get name() { return "GMPProvider"; },
_plugins: null,

8
toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm

@ -49,7 +49,7 @@ this.LightweightThemeImageOptimizer = {
Object.freeze(LightweightThemeImageOptimizer);
let ImageCropper = {
var ImageCropper = {
_inProgress: {},
getCroppedImageURL:
@ -119,7 +119,7 @@ let ImageCropper = {
}
};
let ImageFile = {
var ImageFile = {
read: function ImageFile_read(aURI, aCallback) {
this._netUtil.asyncFetch2(
aURI,
@ -158,7 +158,7 @@ let ImageFile = {
XPCOMUtils.defineLazyModuleGetter(ImageFile, "_netUtil",
"resource://gre/modules/NetUtil.jsm", "NetUtil");
let ImageTools = {
var ImageTools = {
decode: function ImageTools_decode(aInputStream, aContentType) {
let outParam = {value: null};
@ -187,7 +187,7 @@ let ImageTools = {
XPCOMUtils.defineLazyServiceGetter(ImageTools, "_imgTools",
"@mozilla.org/image/tools;1", "imgITools");
let Utils = {
var Utils = {
createCopy: function Utils_createCopy(aData) {
let copy = {};
for (let [k, v] in Iterator(aData)) {

2
toolkit/mozapps/extensions/internal/PluginProvider.jsm

@ -23,7 +23,7 @@ const LOGGER_ID = "addons.plugins";
// Create a new logger for use by the Addons Plugin Provider
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
function getIDHashForString(aStr) {
// return the two-digit hexadecimal code for a byte

4
toolkit/mozapps/extensions/internal/XPIProvider.jsm

@ -222,7 +222,7 @@ const LOGGER_ID = "addons.xpi";
// Create a new logger for use by all objects in this Addons XPI Provider module
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
const LAZY_OBJECTS = ["XPIDatabase"];
@ -7822,7 +7822,7 @@ WinRegInstallLocation.prototype = {
};
#endif
let addonTypes = [
var addonTypes = [
new AddonManagerPrivate.AddonType("extension", URI_EXTENSION_STRINGS,
STRING_TYPE_NAME,
AddonManager.VIEW_TYPE_LIST, 4000,

2
toolkit/mozapps/extensions/internal/XPIProviderUtils.js

@ -29,7 +29,7 @@ const LOGGER_ID = "addons.xpi-utils";
// Create a new logger for use by the Addons XPI Provider Utils
// (Requires AddonManager.jsm)
let logger = Log.repository.getLogger(LOGGER_ID);
var logger = Log.repository.getLogger(LOGGER_ID);
const KEY_PROFILEDIR = "ProfD";
const FILE_DATABASE = "extensions.sqlite";

Loading…
Cancel
Save