[Pkg-mozext-commits] [tabmixplus] 31/44: Apply Eslint no-shadow
David Prévot
taffit at moszumanska.debian.org
Fri Mar 18 20:57:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 2e2f731575870dcc08ae21a9ffda565675b9c09a
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Mar 2 22:59:30 2016 +0200
Apply Eslint no-shadow
---
.eslintrc | 2 +-
chrome/content/changecode.js | 10 ++--
chrome/content/click/click.js | 6 +--
chrome/content/links/userInterface.js | 6 +--
chrome/content/minit/minit.js | 9 ++--
chrome/content/minit/tabView.js | 12 ++---
chrome/content/minit/tablib.js | 18 +++----
chrome/content/preferences/preferences.js | 8 ++--
chrome/content/preferences/shortcuts.js | 2 +-
chrome/content/session/session.js | 4 +-
chrome/content/tab/scrollbox.xml | 7 +--
chrome/content/tab/tab.js | 78 +++++++++++++++----------------
modules/ContentClick.jsm | 10 ++--
modules/LinkNodeUtils.jsm | 4 +-
modules/Places.jsm | 4 +-
modules/SingleWindowModeUtils.jsm | 8 ++--
modules/TabGroupsMigrator.jsm | 2 +-
modules/log.jsm | 4 +-
18 files changed, 98 insertions(+), 96 deletions(-)
diff --git a/.eslintrc b/.eslintrc
index 102fa00..aa0cf11 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -120,7 +120,7 @@
"no-script-url": 0,
"no-self-compare": 0,
"no-sequences": 2,
- "no-shadow": 0,
+ "no-shadow": [2, {"hoist": "all"}],
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-sparse-arrays": 2,
diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index aa08760..1e671d2 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -5,7 +5,7 @@
// so we don't evaluat all code as strict mode code
// aOptions can be: getter, setter or forceUpdate
-Tabmix.changeCode = function(aParent, aName, aOptions) {
+Tabmix.changeCode = function(aParent, afnName, aOptions) {
let console = TabmixSvc.console;
let debugMode = this._debugMode;
@@ -143,12 +143,12 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
}
};
- let fnName = aName.split(".").pop();
+ let name = afnName.split(".").pop();
try {
- return new ChangeCode({obj: aParent, fnName: fnName,
- fullName: aName, options: aOptions});
+ return new ChangeCode({obj: aParent, fnName: name,
+ fullName: afnName, options: aOptions});
} catch (ex) {
- console.clog(console.callerName() + " failed to change " + aName + "\nError: " + ex.message);
+ console.clog(console.callerName() + " failed to change " + afnName + "\nError: " + ex.message);
if (debugMode)
console.obj(aParent, "aParent");
}
diff --git a/chrome/content/click/click.js b/chrome/content/click/click.js
index f0047d7..23b082b 100644
--- a/chrome/content/click/click.js
+++ b/chrome/content/click/click.js
@@ -83,9 +83,9 @@ var TabmixTabClickOptions = {
} else if (leftClick && aEvent.altKey && !aEvent.ctrlKey &&
!aEvent.shiftKey && !aEvent.metaKey) {
prefName = "alt"; /* alt click*/
- window.addEventListener("keyup", function TMP_onKeyup_onTabClick(aEvent) {
- aEvent.currentTarget.removeEventListener("keyup", TMP_onKeyup_onTabClick, true);
- aEvent.stopPropagation();
+ window.addEventListener("keyup", function TMP_onKeyup_onTabClick(event) {
+ event.currentTarget.removeEventListener("keyup", TMP_onKeyup_onTabClick, true);
+ event.stopPropagation();
}, true);
} else if (leftClick && (aEvent.ctrlKey && !aEvent.metaKey ||
!aEvent.ctrlKey && aEvent.metaKey) && !aEvent.shiftKey && !aEvent.altKey) {
diff --git a/chrome/content/links/userInterface.js b/chrome/content/links/userInterface.js
index e326f9b..b3d3ad7 100644
--- a/chrome/content/links/userInterface.js
+++ b/chrome/content/links/userInterface.js
@@ -117,9 +117,9 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
break;
case 3 : { // duplicate tab
let currentUrl = gBrowser.currentURI.spec;
- let newTab = gBrowser.duplicateTab(selectedTab, null, null, null, true);
- Tabmix.clearUrlBar(newTab, currentUrl, true);
- return newTab;
+ let dupTab = gBrowser.duplicateTab(selectedTab, null, null, null, true);
+ Tabmix.clearUrlBar(dupTab, currentUrl, true);
+ return dupTab;
}
case 4 : {// user url
let prefName = replaceLastTab ? "extensions.tabmix.replaceLastTabWith.newtab.url" :
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index a86ebec..1c6461d 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1280,15 +1280,16 @@ Tabmix.navToolbox = {
if (!searchbar)
return;
+ let obj, fn, $LF;
let searchLoadExt = "esteban_torres" in window && "searchLoad_Options" in esteban_torres;
let _handleSearchCommand = searchLoadExt ? esteban_torres.searchLoad_Options.MOZhandleSearch.toString() :
searchbar.handleSearchCommand.toString();
// we check browser.search.openintab also for search button click
if (_handleSearchCommand.indexOf("whereToOpenLink") > -1 &&
_handleSearchCommand.indexOf("forceNewTab") == -1) {
- let [obj, fn] = searchLoadExt ? [esteban_torres.searchLoad_Options, "MOZhandleSearch"] :
+ [obj, fn] = searchLoadExt ? [esteban_torres.searchLoad_Options, "MOZhandleSearch"] :
[searchbar, "handleSearchCommand"];
- let $LF = '\n ';
+ $LF = '\n ';
Tabmix.changeCode(obj, "searchbar." + fn)._replace(
'where = whereToOpenLink(aEvent, false, true);',
'$&' + $LF +
@@ -1300,7 +1301,7 @@ Tabmix.navToolbox = {
}
let organizeSE = "organizeSE" in window && "doSearch" in window.organizeSE;
- let [obj, fn] = searchLoadExt ? [esteban_torres.searchLoad_Options, "MOZdoSearch"] :
+ [obj, fn] = searchLoadExt ? [esteban_torres.searchLoad_Options, "MOZdoSearch"] :
[organizeSE ? window.organizeSE : searchbar, "doSearch"];
if ("__treestyletab__original_doSearch" in searchbar)
[obj, fn] = [searchbar, "__treestyletab__original_doSearch"];
@@ -1311,7 +1312,7 @@ Tabmix.navToolbox = {
// Personas Interactive Theme Engine 1.6.5
let pIte = fnString.indexOf("BTPIServices") > -1;
- let $LF = '\n ';
+ $LF = '\n ';
Tabmix.changeCode(obj, "searchbar." + fn)._replace(
/let params|openUILinkIn/,
'aWhere = Tabmix.navToolbox.whereToOpenSearch(aWhere);' + $LF +
diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index 38b9d32..cffab50 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -17,18 +17,18 @@
case "TabShow":
if (!gBrowser.tabContainer._onDelayTabShow) {
// pass aEvent to this function for use in TGM
- gBrowser.tabContainer._onDelayTabShow = window.setTimeout(function(aEvent) {
+ gBrowser.tabContainer._onDelayTabShow = window.setTimeout(function(event) {
gBrowser.tabContainer._onDelayTabShow = null;
- TMP_eventListener.onTabOpen_delayUpdateTabBar(aEvent.target);
+ TMP_eventListener.onTabOpen_delayUpdateTabBar(event.target);
}, 0, aEvent);
}
break;
case "TabHide":
if (!gBrowser.tabContainer._onDelayTabHide) {
// pass aEvent to this function for use in TGM
- gBrowser.tabContainer._onDelayTabHide = window.setTimeout(function(aEvent) {
+ gBrowser.tabContainer._onDelayTabHide = window.setTimeout(function(event) {
gBrowser.tabContainer._onDelayTabHide = null;
- let tab = aEvent.target;
+ let tab = event.target;
TMP_eventListener.onTabClose_updateTabBar(tab);
}, 0, aEvent);
}
@@ -295,8 +295,8 @@
return;
let parsedData;
- function setData(id) {
- let data = {groupID: id};
+ function setData(groupID) {
+ let data = {groupID: groupID};
parsedData = data;
return TabmixSvc.JSON.stringify(data);
}
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 4c1c1ea..2c0d18f 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -761,7 +761,7 @@ var tablib = { // eslint-disable-line
if ("BrowserGoHome" in window || "BrowserGoHome" in FdTabLoader) {
let loader = "FdTabLoader" in window && "BrowserGoHome" in FdTabLoader;
let obj = loader ? FdTabLoader : window;
- let fnName = loader ? "FdTabLoader.BrowserGoHome" : "window.BrowserGoHome";
+ fnName = loader ? "FdTabLoader.BrowserGoHome" : "window.BrowserGoHome";
Tabmix.changeCode(obj, fnName)._replace(
'var where = whereToOpenLink(aEvent, false, true);',
'$&' +
@@ -1511,13 +1511,13 @@ var tablib = { // eslint-disable-line
var numTabs = tabs.length;
// calc the number of tab to close when there is protected tabs.
let protectedTabs = [];
- function addProtected(tabs) {
- for (let i = 0; i < tabs.length; i++) {
- let tab = tabs[i];
+ function addProtected(aTabs) {
+ for (let i = 0; i < aTabs.length; i++) {
+ let tab = aTabs[i];
if (!onExit && tab.hidden)
continue;
if (protectedTabs.indexOf(tab) == -1)
- protectedTabs.push(tabs[i]);
+ protectedTabs.push(aTabs[i]);
}
}
// we always restore pinned tabs no need to warn about closing
@@ -1560,7 +1560,7 @@ var tablib = { // eslint-disable-line
if (shouldPrompt === 0)
return true;
- var i, tabPos, tabsToClose = 0;
+ var tabPos, tabsToClose = 0;
switch (whatToClose) {
case closing.ALL:
tabsToClose = numTabs - numProtected;
@@ -1576,7 +1576,7 @@ var tablib = { // eslint-disable-line
tabsToClose = numTabs - 1 - numProtected;
break;
case closing.GROUP:
- for (i = numTabs - 1; i > -1; --i) {
+ for (let i = numTabs - 1; i > -1; --i) {
let tab = tabs[i];
if (this.getBrowserForTab(tab).currentURI.spec.indexOf(aDomain) != -1 &&
!tab._isProtected)
@@ -1595,7 +1595,7 @@ var tablib = { // eslint-disable-line
if (!aTab)
throw new Error("Required argument missing: aTab");
tabPos = tabs.indexOf(aTab);
- for (i = 0; i < protectedTabs.length; i++) {
+ for (let i = 0; i < protectedTabs.length; i++) {
let index = tabs.indexOf(protectedTabs[i]);
if (index <= tabPos)
--numProtected;
@@ -1606,7 +1606,7 @@ var tablib = { // eslint-disable-line
if (!aTab)
throw new Error("Required argument missing: aTab");
tabPos = tabs.indexOf(aTab);
- for (i = 0; i < protectedTabs.length; i++) {
+ for (let i = 0; i < protectedTabs.length; i++) {
let index = tabs.indexOf(protectedTabs[i]);
if (index >= tabPos)
--numProtected;
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index fa4fbe1..ed6627e 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -501,12 +501,12 @@ function loadData(pattern) {
var prefName, prefValue;
Shortcuts.prefsChangedByTabmix = true;
for (let i = 1; i < pattern.length; i++) {
- let index = pattern[i].indexOf("=");
- if (index > 0) {
- prefName = pattern[i].substring(0, index);
+ let valIndex = pattern[i].indexOf("=");
+ if (valIndex > 0) {
+ prefName = pattern[i].substring(0, valIndex);
if (SMinstalled && sessionPrefs.indexOf(prefName) > -1)
continue;
- prefValue = pattern[i].substring(index + 1, pattern[i].length);
+ prefValue = pattern[i].substring(valIndex + 1, pattern[i].length);
setPrefByType(prefName, prefValue, true);
}
}
diff --git a/chrome/content/preferences/shortcuts.js b/chrome/content/preferences/shortcuts.js
index c612bcc..089d395 100644
--- a/chrome/content/preferences/shortcuts.js
+++ b/chrome/content/preferences/shortcuts.js
@@ -12,7 +12,7 @@ function getKeysForShortcut(shortcut, id, win) {
if (!win)
win = Services.wm.getMostRecentWindow("navigator:browser");
- let $ = id => id && win.document.getElementById(id);
+ let $ = aID => aID && win.document.getElementById(aID);
let isDisabled = item => item && item.getAttribute("disabled");
let ourKey = $(id);
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index ea9b126..5a99e0d 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -3457,8 +3457,8 @@ TabmixSessionManager = {
// when resuming at startup: add additionally requested pages to the end
if (caller == "firstwindowopen" && loadOnStartup.length) {
let lastPlace = gBrowser.tabs.length - 1;
- for (let aTab of loadOnStartup) {
- gBrowser.moveTabTo(aTab, lastPlace);
+ for (let tab of loadOnStartup) {
+ gBrowser.moveTabTo(tab, lastPlace);
}
}
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index d5fd43a..f89d4d0 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -341,9 +341,10 @@
// if selectedItem don't have height find other tab that does
for (let i = 0; i < tabs.childNodes.length; i++) {
let tab = tabs.childNodes[i];
- let height = tab.boxObject.height;
- if (height)
- return height;
+ let tabHeight = tab.boxObject.height;
+ if (tabHeight) {
+ return tabHeight;
+ }
}
return this._scrollbox.boxObject.height;
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 0bf7c65..de01735 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -1790,9 +1790,10 @@ gTMPprefObserver = {
},
miscellaneousRules: function TMP_PO_miscellaneousRules() {
+ let skin;
// with Walnut theme we get wrong height on Firefox 36
if (Tabmix._buttonsHeight > 50) {
- let skin = Services.prefs.getCharPref("general.skins.selectedSkin");
+ skin = Services.prefs.getCharPref("general.skins.selectedSkin");
Tabmix._buttonsHeight = skin == "walnut" ? 19 : 23;
}
@@ -1848,7 +1849,7 @@ gTMPprefObserver = {
'list-style-image: url("#URL");' +
'-moz-image-region: #REGION;}';
let url = "chrome://browser/skin/Toolbar.png", region;
- let skin = Services.prefs.getCharPref("general.skins.selectedSkin");
+ skin = Services.prefs.getCharPref("general.skins.selectedSkin");
if (skin == "classic/1.0") {
if (TabmixSvc.isLinux)
region = TabmixSvc.australis ? "rect(0px, 360px, 18px, 342px)" :
@@ -1878,8 +1879,8 @@ gTMPprefObserver = {
bgMiddleMargin.style.MozMarginStart = margin;
bgMiddleMargin.style.MozMarginEnd = margin;
} else {
- let newRule = '.tab-background-middle, .tab-background, .tabs-newtab-button {' +
- '-moz-margin-end: %PX; -moz-margin-start: %PX;}';
+ newRule = '.tab-background-middle, .tab-background, .tabs-newtab-button {' +
+ '-moz-margin-end: %PX; -moz-margin-start: %PX;}';
this.insertRule(newRule.replace(/%PX/g, margin), "bgMiddleMargin");
}
if (!visuallyselected) {
@@ -1907,13 +1908,13 @@ gTMPprefObserver = {
// we add the rule after the first tab added
if (typeof colorfulTabs == "object") {
let padding = Tabmix.getStyle(gBrowser.tabs[0], "paddingBottom");
- let newRule = '#tabbrowser-tabs[flowing="multibar"] > .tabbrowser-tab[selected=true]' +
+ newRule = '#tabbrowser-tabs[flowing="multibar"] > .tabbrowser-tab[selected=true]' +
' {margin-bottom: -1px !important; padding-bottom: ' + (padding + 1) + 'px !important;}';
let index = this.insertRule(newRule);
newRule = this._tabStyleSheet.cssRules[index];
gBrowser.tabContainer.addEventListener("TabOpen", function TMP_addStyleRule(aEvent) {
gBrowser.tabContainer.removeEventListener("TabOpen", TMP_addStyleRule, true);
- let padding = Tabmix.getStyle(aEvent.target, "paddingBottom");
+ padding = Tabmix.getStyle(aEvent.target, "paddingBottom");
newRule.style.setProperty("padding-bottom", (padding + 1) + "px", "important");
}, true);
}
@@ -2051,7 +2052,8 @@ gTMPprefObserver = {
},
setMenuIcons: function() {
- function setClass(items, hideIcons) {
+ var hideIcons = Tabmix.prefs.getBoolPref("hideIcons");
+ function setClass(items) {
if (hideIcons) {
for (let i = 0; i < items.length; ++i)
items[i].removeAttribute("class");
@@ -2060,12 +2062,11 @@ gTMPprefObserver = {
items[i].setAttribute("class", items[i].getAttribute("tmp_iconic"));
}
}
- var hideIcons = Tabmix.prefs.getBoolPref("hideIcons");
var iconicItems = document.getElementsByAttribute("tmp_iconic", "*");
- setClass(iconicItems, hideIcons);
+ setClass(iconicItems);
iconicItems = gBrowser.tabContextMenu.getElementsByAttribute("tmp_iconic", "*");
- setClass(iconicItems, hideIcons);
+ setClass(iconicItems);
},
setAutoHidePref: function() {
@@ -2130,32 +2131,31 @@ gTMPprefObserver = {
else
doChange();
}
- return;
- }
-
- let tabsToolbar = $("TabsToolbar");
- let toolBar = Array.prototype.slice.call(tabsToolbar.childNodes);
- let buttonPosition = toolBar.indexOf(newTabButton);
- let tabsPosition = toolBar.indexOf(gBrowser.tabContainer);
- let scrollBox = $("tabmixScrollBox");
- let after = scrollBox && toolBar.indexOf(scrollBox) || tabsPosition;
- let changePosition = (aPosition === 0 && buttonPosition > tabsPosition) ||
- (aPosition == 1 && buttonPosition < after) ||
- (aPosition == 2 && buttonPosition != after + 1);
- if (changePosition) {
- let newPosition = aPosition === 0 ? tabsPosition : after + 1;
- tabsToolbar.insertBefore(newTabButton, tabsToolbar.childNodes.item(newPosition));
- // update currentset
- let cSet = tabsToolbar.getAttribute("currentset") || tabsToolbar.getAttribute("defaultset");
- cSet = cSet.split(",").filter(id => id != "new-tab-button");
- let tabsIndex = cSet.indexOf("tabbrowser-tabs");
- if (tabsIndex < 0)
- return;
- if (aPosition > 0)
- tabsIndex++;
- cSet.splice(tabsIndex, 0, "new-tab-button");
- tabsToolbar.setAttribute("currentset", cSet.join(","));
- document.persist("TabsToolbar", "currentset");
+ } else {
+ let tabsToolbar = $("TabsToolbar");
+ let toolBar = Array.prototype.slice.call(tabsToolbar.childNodes);
+ let buttonPosition = toolBar.indexOf(newTabButton);
+ let tabsPosition = toolBar.indexOf(gBrowser.tabContainer);
+ let scrollBox = $("tabmixScrollBox");
+ let after = scrollBox && toolBar.indexOf(scrollBox) || tabsPosition;
+ let changePosition = (aPosition === 0 && buttonPosition > tabsPosition) ||
+ (aPosition == 1 && buttonPosition < after) ||
+ (aPosition == 2 && buttonPosition != after + 1);
+ if (changePosition) {
+ let newPosition = aPosition === 0 ? tabsPosition : after + 1;
+ tabsToolbar.insertBefore(newTabButton, tabsToolbar.childNodes.item(newPosition));
+ // update currentset
+ let cSet = tabsToolbar.getAttribute("currentset") || tabsToolbar.getAttribute("defaultset");
+ cSet = cSet.split(",").filter(id => id != "new-tab-button");
+ let tabsIndex = cSet.indexOf("tabbrowser-tabs");
+ if (tabsIndex < 0)
+ return;
+ if (aPosition > 0)
+ tabsIndex++;
+ cSet.splice(tabsIndex, 0, "new-tab-button");
+ tabsToolbar.setAttribute("currentset", cSet.join(","));
+ document.persist("TabsToolbar", "currentset");
+ }
}
} else {
this.setShowNewTabButtonAttr(false);
@@ -2270,9 +2270,9 @@ gTMPprefObserver = {
if (aEvent && aEvent.target != window) {
// when the event is not from the window check if tabmix-bottom-toolbox
// change its position
- let rect = bottomToolbox.getBoundingClientRect();
- if (rect.top == this._bottomRect.top &&
- rect.width == this._bottomRect.width)
+ let {top, width} = bottomToolbox.getBoundingClientRect();
+ if (top == this._bottomRect.top &&
+ width == this._bottomRect.width)
return;
}
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index d7073e4..68acfc9 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -327,8 +327,8 @@ ContentClickInternal = {
whereToOpen: function TMP_whereToOpen(event, href, wrappedNode, wrappedOnClickNode) {
let eventWhere;
- let TMP_tabshifted = function TMP_tabshifted(event) {
- var where = eventWhere || this._window.whereToOpenLink(event);
+ let TMP_tabshifted = function TMP_tabshifted(aEvent) {
+ var where = eventWhere || this._window.whereToOpenLink(aEvent);
return where == "tabshifted" ? "tabshifted" : "tab";
}.bind(this);
@@ -905,9 +905,9 @@ ContentClickInternal = {
let current = this._data.currentURL.toLowerCase();
let youtube = /www\.youtube\.com\/watch\?v\=/;
- let isYoutube = href => youtube.test(current) && youtube.test(href);
- let isSamePath = (href, att) => makeURI(current).path.split(att)[0] == makeURI(href).path.split(att)[0];
- let isSame = (href, att) => current.split(att)[0] == href.split(att)[0];
+ let isYoutube = _href => youtube.test(current) && youtube.test(_href);
+ let isSamePath = (_href, att) => makeURI(current).path.split(att)[0] == makeURI(_href).path.split(att)[0];
+ let isSame = (_href, att) => current.split(att)[0] == _href.split(att)[0];
if (hrefFromOnClick) {
hrefFromOnClick = hrefFromOnClick.toLowerCase();
diff --git a/modules/LinkNodeUtils.jsm b/modules/LinkNodeUtils.jsm
index 47d8d41..fa6c453 100644
--- a/modules/LinkNodeUtils.jsm
+++ b/modules/LinkNodeUtils.jsm
@@ -9,7 +9,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TabmixSvc",
"resource://tabmixplus/Services.jsm");
-const attribs = ["onclick", "rel", "onmousedown"];
+const ATTRIBS = ["onclick", "rel", "onmousedown"];
this.LinkNodeUtils = {
isFrameInContent: function(content, href, name) {
@@ -52,7 +52,7 @@ this.LinkNodeUtils = {
_attributes: getAttributes(node.parentNode, ["onclick"])
},
_focusedWindowHref: focusedWindow.top.location.href,
- _attributes: getAttributes(node, attribs)
+ _attributes: getAttributes(node, ATTRIBS)
};
if (getTargetIsFrame)
wrapper.targetIsFrame = targetIsFrame(wrapper.target, focusedWindow);
diff --git a/modules/Places.jsm b/modules/Places.jsm
index e6f1c0c..0596589 100644
--- a/modules/Places.jsm
+++ b/modules/Places.jsm
@@ -90,9 +90,9 @@ PlacesUtilsInternal = {
PlacesUIUtils["tabmix_" + aFn] = PlacesUIUtils[aFn];
});
- function updateOpenTabset(fnName, treeStyleTab) {
+ function updateOpenTabset(name, treeStyleTab) {
let openGroup = " browserWindow.TMP_Places.openGroup(urls, ids, where$1);";
- Tabmix.changeCode(PlacesUIUtils, "PlacesUIUtils." + fnName)._replace(
+ Tabmix.changeCode(PlacesUIUtils, "PlacesUIUtils." + name)._replace(
'urls = []',
'behavior, $&', {check: treeStyleTab}
)._replace(
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index 3a126f6..aca1221 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -58,11 +58,11 @@ this.SingleWindowModeUtils = {
this.initService();
aWindow.addEventListener("load", function _onLoad(aEvent) {
- let win = aEvent.currentTarget;
- win.removeEventListener("load", _onLoad, false);
- let docElement = win.document.documentElement;
+ let window = aEvent.currentTarget;
+ window.removeEventListener("load", _onLoad, false);
+ let docElement = window.document.documentElement;
if (docElement.getAttribute("windowtype") == "navigator:browser")
- this.onLoad(win);
+ this.onLoad(window);
}.bind(this), false);
aWindow.gTMPprefObserver.setLink_openPrefs();
diff --git a/modules/TabGroupsMigrator.jsm b/modules/TabGroupsMigrator.jsm
index 95ceb41..721f2a7 100644
--- a/modules/TabGroupsMigrator.jsm
+++ b/modules/TabGroupsMigrator.jsm
@@ -238,7 +238,7 @@ this.TabmixGroupsMigrator = {
group.tabGroupsMigrationTitle = winTitle + " " + title;
}
} else {
- let windowGroupMap = new Map();
+ windowGroupMap = new Map();
windowGroupMap.set("active group", {
tabs: win.tabs,
anonGroupID: 1,
diff --git a/modules/log.jsm b/modules/log.jsm
index 4ec4117..b0e329c 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -244,8 +244,8 @@ options = {
fileName = fileName.slice(0, columnIndex);
}
fileName = decodeURI(fileName).replace(re, "");
- let atIndex = line.indexOf(_char);
- let name = line.slice(0, atIndex).split("(").shift();
+ let index = line.indexOf(_char);
+ let name = line.slice(0, index).split("(").shift();
let formated = ' File "' + fileName + '", line ' + lineNumber;
if (colNumber)
formated += ', col ' + colNumber;
--
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