mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Mass-replace global-scope let with var in Pale Moon and TychoAM
tag #155
This commit is contained in:
parent
7099ae78c1
commit
d5b0bc88af
62 changed files with 120 additions and 119 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
/**
|
||||
* This singleton implements site dragging functionality.
|
||||
*/
|
||||
let gDrag = {
|
||||
var gDrag = {
|
||||
/**
|
||||
* The site offset to the drag start point.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const DELAY_REARRANGE_MS = 100;
|
|||
/**
|
||||
* This singleton implements site dropping functionality.
|
||||
*/
|
||||
let gDrop = {
|
||||
var gDrop = {
|
||||
/**
|
||||
* The last drop target.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
/**
|
||||
* This singleton represents the grid that contains all sites.
|
||||
*/
|
||||
let gGrid = {
|
||||
var gGrid = {
|
||||
/**
|
||||
* The DOM node of the grid.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue