[Pkg-mozext-commits] [tabmixplus] 13/107: Follow up bug 1202902 - replace global let with var
David Prévot
taffit at moszumanska.debian.org
Tue Dec 29 19:02:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit c5e5f33404c9d9756e4bf8b70fee12463ebd083d
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Oct 11 19:45:49 2015 +0300
Follow up bug 1202902 - replace global let with var
---
chrome/content/content.js | 4 +-
chrome/content/links/removeBlankTab.js | 2 +-
chrome/content/preferences/bindings.xml | 2 +-
chrome/content/preferences/shortcuts.xml | 16 +++----
.../preferences/subdialogs/pref-appearance.js | 4 +-
.../preferences/subdialogs/pref-appearance.xml | 12 +++---
chrome/content/tab/scrollbox.xml | 50 +++++++++++-----------
chrome/content/tab/tabbrowser_4.xml | 6 +--
chrome/content/tab/text.xml | 2 +-
modules/ContentClick.jsm | 2 +-
modules/Decode.jsm | 2 +-
modules/DynamicRules.jsm | 2 +-
modules/Places.jsm | 2 +-
modules/Services.jsm | 2 +-
modules/extensions/AddonManager.jsm | 8 ++--
modules/log.jsm | 2 +-
16 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/chrome/content/content.js b/chrome/content/content.js
index 62c2cd2..917f7b7 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -25,9 +25,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "ContextMenu",
XPCOMUtils.defineLazyModuleGetter(this, "TabmixUtils",
"resource://tabmixplus/Utils.jsm");
-let self = this;
+var self = this;
-let TabmixContentHandler = {
+var TabmixContentHandler = {
MESSAGES: [
"Tabmix:restorePermissions",
"Tabmix:collectPermissions",
diff --git a/chrome/content/links/removeBlankTab.js b/chrome/content/links/removeBlankTab.js
index e8656b7..68e94c4 100644
--- a/chrome/content/links/removeBlankTab.js
+++ b/chrome/content/links/removeBlankTab.js
@@ -1,6 +1,6 @@
"use strict";
-let TabmixRemoveBlankTab = {
+var TabmixRemoveBlankTab = {
initialize: function() {
switch (window.document.documentElement.id) {
case "unknownContentType":
diff --git a/chrome/content/preferences/bindings.xml b/chrome/content/preferences/bindings.xml
index cd7a42a..3bb6da9 100644
--- a/chrome/content/preferences/bindings.xml
+++ b/chrome/content/preferences/bindings.xml
@@ -38,7 +38,7 @@
<implementation>
<constructor>
<![CDATA[
- let update = Tabmix.isVersion(320) ? "" : " && aUpdate";
+ var update = Tabmix.isVersion(320) ? "" : " && aUpdate";
Tabmix.changeCode(this, "_setValue")._replace(
'return aValue;',
'else if (!this.instantApply' + update + ' && this.value === aValue) {' +
diff --git a/chrome/content/preferences/shortcuts.xml b/chrome/content/preferences/shortcuts.xml
index 1ce6c15..9312511 100644
--- a/chrome/content/preferences/shortcuts.xml
+++ b/chrome/content/preferences/shortcuts.xml
@@ -62,7 +62,7 @@
<parameter name="aNewValue"/>
<parameter name="aDisabled"/>
<body><![CDATA[
- let newValue = (aDisabled ? "d&" : "") + (aNewValue || "").replace(/^d&/, "");
+ var newValue = (aDisabled ? "d&" : "") + (aNewValue || "").replace(/^d&/, "");
if (newValue != Shortcuts.keyStringify(this.key)) {
let newKey = Shortcuts.keyParse(newValue)
newKey.disabled = aDisabled;
@@ -95,9 +95,9 @@
<method name="updateNotification">
<body><![CDATA[
- let shortcut = !this.disabled && getFormattedKey(this.key);
- let usedKey = shortcut && getKeysForShortcut(shortcut, this.keyid);
- let box = this.notificationbox;
+ var shortcut = !this.disabled && getFormattedKey(this.key);
+ var usedKey = shortcut && getKeysForShortcut(shortcut, this.keyid);
+ var box = this.notificationbox;
while (box.hasChildNodes())
box.removeChild(box.firstChild);
if (usedKey) {
@@ -120,7 +120,7 @@
<parameter name="event"/>
<body><![CDATA[
// handle Ctrl/Command + W
- let control = !event.shiftKey && (event.ctrlKey || event.metaKey);
+ var control = !event.shiftKey && (event.ctrlKey || event.metaKey);
if (control && event.keyCode == 87)
this.handleKeyEvents(event, true);
]]></body>
@@ -134,7 +134,7 @@
event.stopPropagation();
event.stopImmediatePropagation();
- let key = {modifiers: "", key: "", keycode: ""};
+ var key = {modifiers: "", key: "", keycode: ""};
key.modifiers =
["ctrl","meta","alt","shift"].filter(mod => event[mod + "Key"]).
join(",").replace("ctrl", "control");
@@ -180,7 +180,7 @@
return;
}
- let newValue = Shortcuts.validateKey(key) || Shortcuts.keyStringify(this.key);
+ var newValue = Shortcuts.validateKey(key) || Shortcuts.keyStringify(this.key);
this.applyNewValue(newValue, false);
]]></body>
</method>
@@ -224,7 +224,7 @@
<property name="defaultPref" readonly="true">
<getter><![CDATA[
- let defaultVal = (Shortcuts.keys[this.id].default || "").replace(/^d&/, "");
+ var defaultVal = (Shortcuts.keys[this.id].default || "").replace(/^d&/, "");
if (defaultVal) {
let resetButton = document.getAnonymousElementByAttribute(this, "anonid", "reset");
resetButton.hidden = false;
diff --git a/chrome/content/preferences/subdialogs/pref-appearance.js b/chrome/content/preferences/subdialogs/pref-appearance.js
index c53cf4c..323c1bb 100644
--- a/chrome/content/preferences/subdialogs/pref-appearance.js
+++ b/chrome/content/preferences/subdialogs/pref-appearance.js
@@ -1,8 +1,8 @@
"use strict";
-let $ = id => document.getElementById(id);
+var $ = id => document.getElementById(id);
-let tabstyles = { // jshint ignore:line
+var tabstyles = { // jshint ignore:line
pref: "appearance_tab",
init: function() {
$("stylestabs").selectedIndex = Tabmix.prefs.prefHasUserValue(this.pref) ?
diff --git a/chrome/content/preferences/subdialogs/pref-appearance.xml b/chrome/content/preferences/subdialogs/pref-appearance.xml
index 1a5154e..a6fefc6 100644
--- a/chrome/content/preferences/subdialogs/pref-appearance.xml
+++ b/chrome/content/preferences/subdialogs/pref-appearance.xml
@@ -193,8 +193,8 @@
<method name="updateDisableState">
<parameter name="aID"/>
<body><![CDATA[
- let disableBg = this.treeStyleTab && aID == "bg";
- let disabled = this.disabled || disableBg ||
+ var disableBg = this.treeStyleTab && aID == "bg";
+ var disabled = this.disabled || disableBg ||
!this._getElementById(aID).checked;
if (disableBg)
this._getElementById("bg").disabled = true;
@@ -248,7 +248,7 @@
<method name="getColor">
<parameter name="format"/>
<body><![CDATA[
- let rgba = this.rgba;
+ var rgba = this.rgba;
if (format) {
rgba[3] = this.getAttribute("disabled") ? 0.2 :
Math.max(.2, rgba[3]);
@@ -259,7 +259,7 @@
<property name="rgba" readonly="true">
<getter><![CDATA[
- let rgba = this._RGB.map(c => parseInt(c.value));
+ var rgba = this._RGB.map(c => parseInt(c.value));
rgba[3] /= 100;
return rgba;
]]></getter>
@@ -268,7 +268,7 @@
<property name="color"
onget="return this.getColor();">
<setter><![CDATA[
- let color = val.replace(/rgba|rgb|\(|\)/g, "").split(",");
+ var color = val.replace(/rgba|rgb|\(|\)/g, "").split(",");
for (let i = 0; i < 3; i++)
this._RGB[i].value = color[i];
this._RGB[3].value = (color[3] || 1) * 100;
@@ -295,7 +295,7 @@
<handlers>
<handler event="change"><![CDATA[
- let item = event.originalTarget;
+ var item = event.originalTarget;
if (item.localName == "colorpicker") {
// colorpicker use rgb hexadecimal format
let color = item.color.replace("#","");
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 32c1754..6d2134c 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -38,7 +38,7 @@
<constructor>
<![CDATA[
- let tabstrip = gBrowser.tabContainer.mTabstrip;
+ var tabstrip = gBrowser.tabContainer.mTabstrip;
tabstrip._scrollButtonDownRight = this._scrollButtonDown;
tabstrip._scrollButtonUpRight = this._scrollButtonUp;
]]>
@@ -47,11 +47,11 @@
<method name="finishScroll">
<parameter name="aEvent"/>
<body><![CDATA[
- let tabBar = gBrowser.tabContainer;
+ var tabBar = gBrowser.tabContainer;
if (!tabBar.useTabmixDnD(aEvent))
return;
TMP_tabDNDObserver.clearDragmark();
- let index, target = aEvent.originalTarget.getAttribute("anonid");
+ var index, target = aEvent.originalTarget.getAttribute("anonid");
if (target == "scrollbutton-up-right")
index = -1;
else if (target == "scrollbutton-down-right")
@@ -71,7 +71,7 @@
<handlers>
<handler event="dragover"><![CDATA[
- let tabBar = gBrowser.tabContainer;
+ var tabBar = gBrowser.tabContainer;
if (tabBar.useTabmixDnD(event))
TMP_tabDNDObserver.onDragOver(event);
]]></handler>
@@ -220,7 +220,7 @@
'(this.orient == "vertical" && this.isMultiRow ? this.innerbox.getBoundingClientRect().height : $&)'
)._replace(
/(\})(\)?)$/,
- ' let box = document.getElementById("tabmixScrollBox");\n' +
+ ' var box = document.getElementById("tabmixScrollBox");\n' +
' Tabmix.setItem(box, "scrolledtoend", scrolledToEnd || null);\n' +
' Tabmix.setItem(box, "scrolledtostart", scrolledToStart || null);\n' +
'$1$2'
@@ -247,7 +247,7 @@
<method name="_createScrollButtonContextMenu">
<parameter name="aEvent"/>
<body><![CDATA[
- let side = aEvent.target.className == "scrollbutton-up" ? "left" : "right";
+ var side = aEvent.target.className == "scrollbutton-up" ? "left" : "right";
TabmixAllTabs.createScrollButtonTabsList(aEvent, side);
]]></body>
</method>
@@ -271,7 +271,7 @@
<parameter name="px"/>
<parameter name="aSmoothScroll"/>
<body><![CDATA[
- let newPx = (this._isScrolling || aSmoothScroll) ? px : this._distanceToRow(px);
+ var newPx = (this._isScrolling || aSmoothScroll) ? px : this._distanceToRow(px);
this.scrollPosition += newPx;
]]></body>
</method>
@@ -303,8 +303,8 @@
<body><![CDATA[
if (!this.isMultiRow)
return amountToScroll;
- let rowHeight = this.singleRowHeight;
- let position = this.scrollPosition;
+ var rowHeight = this.singleRowHeight;
+ var position = this.scrollPosition;
return Math.round((amountToScroll + position) / rowHeight) * rowHeight - position;
]]></body>
</method>
@@ -332,7 +332,7 @@
// still in one row
var tabs = document.getBindingParent(this);
- let height = tabs.selectedItem.boxObject.height;
+ var height = tabs.selectedItem.boxObject.height;
if (height)
return height;
@@ -360,11 +360,11 @@
return;
Tabmix.tabsUtils.adjustNewtabButtonvisibility();
- let tabs = this._getScrollableElements();
+ var tabs = this._getScrollableElements();
if (!tabs.length)
return;
- let isFirstTabVisible = Tabmix.tabsUtils.isElementVisible(tabs[0]);
- let isLastTabVisible = Tabmix.tabsUtils.isElementVisible(tabs[tabs.length-1]);
+ var isFirstTabVisible = Tabmix.tabsUtils.isElementVisible(tabs[0]);
+ var isLastTabVisible = Tabmix.tabsUtils.isElementVisible(tabs[tabs.length-1]);
if (!isFirstTabVisible || !isLastTabVisible) {
// show Newtabbutton for the first time
// for the case last tab in row fill the all strip and the button
@@ -387,7 +387,7 @@
<method name="setFirstTabInRow">
<parameter name="scroll"/>
<body><![CDATA[
- let firstVisibleRow = Math.round(this.scrollPosition / this.singleRowHeight) + 1;
+ var firstVisibleRow = Math.round(this.scrollPosition / this.singleRowHeight) + 1;
if (scroll) {
if (this.firstVisibleRow == firstVisibleRow)
return;
@@ -401,11 +401,11 @@
this.firstVisibleRow = firstVisibleRow;
///XXX check if we can set the margin with animation when we scroll
- let end = Tabmix.ltr ? "right": "left";
- let containerEnd = this.scrollClientRect[end];
- let topY = Tabmix.tabsUtils.topTabY;
- let tabs = this._getScrollableElements();
- let index, current = 0;
+ var end = Tabmix.ltr ? "right": "left";
+ var containerEnd = this.scrollClientRect[end];
+ var topY = Tabmix.tabsUtils.topTabY;
+ var tabs = this._getScrollableElements();
+ var index, current = 0;
for (let i = 0; i < tabs.length; i++) {
let tab = tabs[i];
if (tab.closing) {
@@ -456,8 +456,8 @@
this.firstTabInRowMargin = 0;
// getElementsByAttribute return a live nodList
// each time we remove the attribute we remove node from the list
- let tabBar = document.getBindingParent(this);
- let tabs = tabBar.getElementsByAttribute("tabmix-firstTabInRow" , "*");
+ var tabBar = document.getBindingParent(this);
+ var tabs = tabBar.getElementsByAttribute("tabmix-firstTabInRow" , "*");
for (let i = 0, num = tabs.length; i < num; i++) {
tabs[0].removeAttribute("tabmix-firstTabInRow");
}
@@ -547,7 +547,7 @@
this.__needToSetVerticalOrient = true;
// when widthFitTitle is false we enter vertical mode only after we are in overflow
// if first or last tab is unvisible enter vertical mode
- let self = this;
+ var self = this;
this._enterVerticalModeTimeout = setTimeout(function() {
self._enterVerticalModeTimeout = null;
self._enterVerticalMode(true);
@@ -571,7 +571,7 @@
if (this.__needToSetVerticalOrient)
this._enterVerticalMode();
- let tabBar = document.getBindingParent(this);
+ var tabBar = document.getBindingParent(this);
tabBar._unlockTabSizing();
if (this.isMultiRow && tabBar.firstChild.pinned)
@@ -614,11 +614,11 @@
<method name="updatePosition">
<body><![CDATA[
- let updateFullScreen, tabBar = gBrowser.tabContainer;
+ var updateFullScreen, tabBar = gBrowser.tabContainer;
Tabmix.setItem(tabBar.mTabstrip, "flowing", TabmixTabbar.flowing);
Tabmix.tabsUtils.tabstripInnerbox = document.getAnonymousElementByAttribute(
tabBar.mTabstrip._scrollbox, "class", "box-inherit scrollbox-innerbox");
- let bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
+ var bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
if (!bottomToolbox) {
bottomToolbox = document.createElement("toolbox");
bottomToolbox.setAttribute("id", "tabmix-bottom-toolbox");
diff --git a/chrome/content/tab/tabbrowser_4.xml b/chrome/content/tab/tabbrowser_4.xml
index afaf81d..3e42a8c 100644
--- a/chrome/content/tab/tabbrowser_4.xml
+++ b/chrome/content/tab/tabbrowser_4.xml
@@ -209,7 +209,7 @@
if (!aTab || !aTab.parentNode)
return; // this tab already removed....
- let pref = Tabmix.prefs.getIntPref("tabs.closeButtons");
+ var pref = Tabmix.prefs.getIntPref("tabs.closeButtons");
if (pref != 2 && pref != 4)
return;
@@ -282,7 +282,7 @@
<method name="onMouseCommand">
<parameter name="aEvent"/>
<body><![CDATA[
- let isSelected = this == this.parentNode.selectedItem;
+ var isSelected = this == this.parentNode.selectedItem;
Tabmix.setItem(this, "clickOnCurrent",
isSelected && aEvent.detail == 1 || null);
if (isSelected)
@@ -307,7 +307,7 @@
<method name="clearTimeouts">
<body><![CDATA[
- let timeouts = ["mSelect", "mFocusId", "mButtonId", "autoReloadTimerID", "tabmix_mouseover"];
+ var timeouts = ["mSelect", "mFocusId", "mButtonId", "autoReloadTimerID", "tabmix_mouseover"];
timeouts.forEach(function(aTimeout) {
if (aTimeout in this && this[aTimeout]) {
clearTimeout(this[aTimeout]);
diff --git a/chrome/content/tab/text.xml b/chrome/content/tab/text.xml
index 713735f..d4d6456 100644
--- a/chrome/content/tab/text.xml
+++ b/chrome/content/tab/text.xml
@@ -9,7 +9,7 @@
<implementation>
<constructor>
<![CDATA[
- let topWin = Services.wm.getMostRecentWindow("navigator:browser");
+ var topWin = Services.wm.getMostRecentWindow("navigator:browser");
if (!topWin || topWin.Tabmix.isVersion(200))
return;
eval("this.open ="+this.open.toString().replace(
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 36c6245..5a647d5 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -58,7 +58,7 @@ this.TabmixContentClick = {
};
Object.freeze(TabmixContentClick);
-let Tabmix = {};
+var Tabmix = {};
var ContentClickInternal = {
_timer: null,
diff --git a/modules/Decode.jsm b/modules/Decode.jsm
index 7702011..c2f55eb 100644
--- a/modules/Decode.jsm
+++ b/modules/Decode.jsm
@@ -27,7 +27,7 @@ this.Decode = {
}
};
-let escapeHash = {};
+var escapeHash = {};
function getReturnValue(input) {
var ret = escapeHash[input];
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index 5db384b..6ef4b8b 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -16,7 +16,7 @@ XPCOMUtils.defineLazyGetter(this, "Prefs", function() {
return Services.prefs.getBranch("extensions.tabmix.styles.");
});
-let TYPE;
+var TYPE;
XPCOMUtils.defineLazyGetter(this, "SSS", function() {
let sss = Cc['@mozilla.org/content/style-sheet-service;1']
.getService(Ci.nsIStyleSheetService);
diff --git a/modules/Places.jsm b/modules/Places.jsm
index a604b85..bf3aad8 100644
--- a/modules/Places.jsm
+++ b/modules/Places.jsm
@@ -36,7 +36,7 @@ this.TabmixPlacesUtils = Object.freeze({
}
});
-let Tabmix = {};
+var Tabmix = {};
var PlacesUtilsInternal = {
_timer: null,
diff --git a/modules/Services.jsm b/modules/Services.jsm
index 829454b..1b60aae 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -7,7 +7,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-let _versions = {};
+var _versions = {};
function isVersion(aVersionNo) {
if (TabmixSvc.isPaleMoonID) {
let paleMoonVer = arguments.length > 1 ? arguments[1] : -1;
diff --git a/modules/extensions/AddonManager.jsm b/modules/extensions/AddonManager.jsm
index e68a60a..d3c2af3 100644
--- a/modules/extensions/AddonManager.jsm
+++ b/modules/extensions/AddonManager.jsm
@@ -16,7 +16,7 @@ function log(msg) { // jshint ignore:line
}
// https://addons.mozilla.org/en-US/firefox/addon/private-tab
-let PrivateTab = {
+var PrivateTab = {
id: "privateTab at infocatcher",
onEnabled: function() {
this._resetNewTabButton();
@@ -31,7 +31,7 @@ let PrivateTab = {
}
};
-let SessionManager = {
+var SessionManager = {
id: "{1280606b-2510-4fe0-97ef-9b5a22eafe30}",
init: function() {
this._saveTabmixPrefs();
@@ -75,7 +75,7 @@ let SessionManager = {
}
};
-let TabmixListener = {
+var TabmixListener = {
onChange: function(aAddon, aAction) {
let id = aAddon.id;
if (id == SessionManager.id)
@@ -97,7 +97,7 @@ let TabmixListener = {
}
};
-let TabmixAddonManager = {
+var TabmixAddonManager = {
initialized: false,
init: function() {
if (this.initialized)
diff --git a/modules/log.jsm b/modules/log.jsm
index ffcd5ca..e503cb0 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -11,7 +11,7 @@ XPCOMUtils.defineLazyGetter(this, "OS", function() {
return Cu.import("resource://gre/modules/osfile.jsm", {}).OS;
});
-let gNextID = 1;
+var gNextID = 1;
this.console = {
getObject: function(aWindow, aMethod) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list