[Pkg-mozext-commits] [tabmixplus] 05/107: Start using ESLint and fix error according to the new rules
David Prévot
taffit at moszumanska.debian.org
Tue Dec 29 19:02:44 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 3a02456d5e288144a9f328c88ed8e4d07494f7d7
Author: onemen <tabmix.onemen at gmail.com>
Date: Tue Aug 4 21:10:06 2015 +0300
Start using ESLint and fix error according to the new rules
---
chrome/content/changecode.js | 5 +++--
chrome/content/click/click.js | 1 -
chrome/content/content.js | 4 ++--
chrome/content/extensions/extensions.js | 10 ++++++----
chrome/content/extensions/sage.js | 1 -
chrome/content/flst/lasttab.js | 7 +++----
chrome/content/links/newTab.js | 3 +--
chrome/content/minit/minit.js | 13 +++++--------
chrome/content/places/places.js | 4 ++--
chrome/content/preferences/preferences.js | 4 +++-
chrome/content/session/session.js | 15 +++++++++------
chrome/content/session/sessionStore.js | 8 ++++----
chrome/content/tab/tab.js | 15 +++++++--------
chrome/content/tabmix.js | 1 -
defaults/preferences/tabmix.js | 2 ++
modules/ContentClick.jsm | 12 ++++++------
modules/DownloadLastDir.jsm | 1 +
modules/DynamicRules.jsm | 7 ++++---
modules/MergeWindows.jsm | 6 +++---
modules/Services.jsm | 8 ++++++--
modules/SingleWindowModeUtils.jsm | 9 ++++-----
modules/extensions/CompatibilityCheck.jsm | 1 +
22 files changed, 72 insertions(+), 65 deletions(-)
diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index 2b9c9d4..3390fab 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -1,4 +1,5 @@
/* jshint strict: false */
+/* eslint strict: 0 */
// don't use strict for this file
// so we don't evaluat all code as strict mode code
@@ -91,7 +92,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
defineProperty: function(aObj, aName, aCode) {
if (!this.type)
- throw "Tabmix:\n" + this.fullName + " don't have setter or getter";
+ throw new Error("Tabmix:\n" + this.fullName + " don't have setter or getter");
let [obj, fnName] = [aObj || this.obj, aName || this.fnName];
let descriptor = {enumerable: true, configurable: true};
@@ -178,4 +179,4 @@ Tabmix.nonStrictMode = function(aObj, aFn, aArg) {
}
return fn("(" + code + ")");
};
-})(this);
+}(this));
diff --git a/chrome/content/click/click.js b/chrome/content/click/click.js
index 6a79eb1..64ab519 100644
--- a/chrome/content/click/click.js
+++ b/chrome/content/click/click.js
@@ -715,7 +715,6 @@ var TabmixContext = {
duplicateTabMenu.hidden && duplicateWinMenu.hidden && closeTabMenu.hidden &&
lockTabMenu.hidden && protectTabMenu.hidden && tabsListMenu.hidden &&
freezeTabMenu.hidden && undoCloseTabMenu.hidden && undoCloseListMenu.hidden;
-
} catch (ex) {Tabmix.assert(ex);}
return true;
},
diff --git a/chrome/content/content.js b/chrome/content/content.js
index 9804965..62c2cd2 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -25,7 +25,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "ContextMenu",
XPCOMUtils.defineLazyModuleGetter(this, "TabmixUtils",
"resource://tabmixplus/Utils.jsm");
-let global = this;
+let self = this;
let TabmixContentHandler = {
MESSAGES: [
@@ -141,7 +141,7 @@ var TabmixClickEventHandler = {
init: function init() {
if (TabmixSvc.version(380) &&
Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT)
- global.addEventListener("click", this, true);
+ self.addEventListener("click", this, true);
},
handleEvent: function(event) {
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index 04533f4..3619155 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -17,10 +17,12 @@ var TMP_extensionsCompatibility = {
},
onContentLoaded: function TMP_EC_onContentLoaded() {
- Tabmix.extensions = {treeStyleTab: false, tabGroupManager: false,
- verticalTabBar: false, ieTab2: false,
- gIeTab: false, /* for ieTab and ieTab2 */
- ctr: false /* classic theme restorer */};
+ Tabmix.extensions = {
+ treeStyleTab: false, tabGroupManager: false,
+ verticalTabBar: false, ieTab2: false,
+ gIeTab: false, /* for ieTab and ieTab2 */
+ ctr: false/* classic theme restorer */
+ };
if (typeof classicthemerestorerjs == "object") {
Tabmix.extensions.ctr = true;
diff --git a/chrome/content/extensions/sage.js b/chrome/content/extensions/sage.js
index 4ede54c..cea588b 100644
--- a/chrome/content/extensions/sage.js
+++ b/chrome/content/extensions/sage.js
@@ -45,7 +45,6 @@ var TMP_Sage = {
switch (windowType)'
).toCode();
}
-
},
buildContextMenu: function() {
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index 08d50a5..2d87602 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -1,10 +1,10 @@
"use strict";
-/*////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
// The Original Code is the "LastTab" extension for Mozilla Firefox.//
// version 1.5 - October 26, 2005 //
// The Initial Developer of the Original Code is Timothy Humphrey. //
-/*////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
var TMP_LastTab = {
CtrlKey: false,
handleCtrlTab: true,
@@ -121,8 +121,7 @@ var TMP_LastTab = {
}
this.TabIndex = this.inverseIndex(event.target.value);
}
- else {
- if (event.target.value != this.inverseIndex(this.TabIndex))
+ else if (event.target.value != this.inverseIndex(this.TabIndex)) {
event.target.setAttribute("_moz-menuactive", "false");
}
},
diff --git a/chrome/content/links/newTab.js b/chrome/content/links/newTab.js
index 3f7e9bd..0246651 100644
--- a/chrome/content/links/newTab.js
+++ b/chrome/content/links/newTab.js
@@ -31,5 +31,4 @@
if (Tabmix.prefs.getBoolPref("titlefrombookmark"))
updateTitle();
}
-
-})();
+}());
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 7c4966b..b1e3568 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1,7 +1,6 @@
"use strict";
-///////////////////////////////////////////////////////////////////////////
-//// Drag and Drop observers
+/**** Drag and Drop observers ****/
var TMP_tabDNDObserver = {
gBackupLabel: "",
gMsg: null,
@@ -102,7 +101,6 @@ var TMP_tabDNDObserver = {
let c = document.getElementById("content-deck").getBoundingClientRect();
this.onLastToolbar = Math.abs(t.bottom - r.bottom) < 2 && Math.abs(r.bottom - c.top) < 2;
}
-
},
get _isCustomizing() {
@@ -331,10 +329,10 @@ var TMP_tabDNDObserver = {
event.stopPropagation();
document.getElementById("tabmix-tooltip").hidePopup();
- /* jshint ignore:start */
+ /* jshint ignore:start */ /* eslint-disable */
// old TreeStyleTab extension version look for isTabReorder in our code
var isTabReorder = draggeType == this.DRAG_TAB_IN_SAME_WINDOW;
- /* jshint ignore:end */
+ /* jshint ignore:end */ /* eslint-enable */
var newIndex = this._getDNDIndex(event);
var oldIndex = draggedTab ? draggedTab._tPos : -1;
var left_right;
@@ -365,8 +363,7 @@ var TMP_tabDNDObserver = {
if (draggedTab.pinned) {
if (newIndex >= numPinned)
gBrowser.unpinTab(draggedTab);
- } else {
- if (newIndex <= numPinned - 1 || (newIndex == numPinned && dt.__pinTab))
+ } else if (newIndex <= numPinned - 1 || (newIndex == numPinned && dt.__pinTab)) {
gBrowser.pinTab(draggedTab);
}
if (newIndex != draggedTab._tPos)
@@ -397,7 +394,7 @@ var TMP_tabDNDObserver = {
// Stop the about:blank load
newBrowser.stop();
// make sure it has a docshell
- newBrowser.docShell; // jshint ignore:line
+ void newBrowser.docShell;
let numPinned = gBrowser._numPinnedTabs;
if (newIndex < numPinned || draggedTab.pinned && newIndex == numPinned)
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 944137d..fd39080 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -244,7 +244,8 @@ var TMP_Places = {
getPrefByDocumentURI: function(aWindow) {
switch (aWindow.document.documentURI) {
case "chrome://browser/content/places/places.xul":
- let historyId = PlacesUIUtils.leftPaneQueries["History"];
+ let history = PlacesUIUtils.getString("OrganizerQueryHistory");
+ let historyId = PlacesUIUtils.leftPaneQueries[history];
let node = PlacesOrganizer._places.selectedNode;
let historySelected = node.itemId == historyId ||
node.parent && node.parent.itemId == historyId;
@@ -360,7 +361,6 @@ var TMP_Places = {
while (removeTabs.length > 0) {
gBrowser.removeTab(removeTabs.pop());
}
-
},
setTabTitle: function TMP_PC_setTabTitle(aTab, aUrl, aID) {
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index 0d466f3..dc0c317 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -469,7 +469,9 @@ function showFilePicker(mode) {
function loadData(pattern) {
if (pattern[0] != "tabmixplus") {
// Can not import because it is not a valid file.
- alert(TabmixSvc.getString("tmp.importPref.error1"));
+ let msg = TabmixSvc.getString("tmp.importPref.error1");
+ let title = TabmixSvc.getString("tabmixoption.error.title");
+ Services.prompt.alert(window, title, msg);
return;
}
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index b0f18a0..84c225f 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -1497,7 +1497,9 @@ var TabmixSessionManager = { // jshint ignore:line
default: return false;
}
if (numTabs > 0) return {win: numWindows, tab: numTabs};
- alert(TabmixSvc.getSMString("sm.sessoinSave.error"));
+ let msg = TabmixSvc.getSMString("sm.sessoinSave.error");
+ let title = TabmixSvc.getString("sm.title");
+ Services.prompt.alert(window, title, msg);
return false;
},
@@ -2256,7 +2258,7 @@ var TabmixSessionManager = { // jshint ignore:line
var loadSession = this.prefBranch.getIntPref("onStart.loadsession");
// after last session end with restart load the last session without any prompt
// unless we are after crash
- var startupEmpty = false, savePref = false;
+ var startupEmpty = false;
var result = {}, title, msg = "", buttons;
if (afterCrash)
title = TabmixSvc.getSMString("sm.afterCrash.title");
@@ -2306,13 +2308,11 @@ var TabmixSessionManager = { // jshint ignore:line
loadSessionIsValid = false;
thisPath = this.gSessionPath[1]; // load last session
this.prefBranch.setIntPref("onStart.loadsession", -1);
- savePref = true;
}
break;
default: // just in case that somehow onStart.loadsession is invalid
loadSession = -1;
this.prefBranch.setIntPref("onStart.loadsession", -1);
- savePref = true;
/* falls through */
case -2:
case -1:
@@ -3157,7 +3157,10 @@ try {
var rdfNodeWindow = this.RDFService.GetResource(path);
var rdfNodeTabs = this.getResource(rdfNodeWindow, "tabs");
if (!(rdfNodeTabs instanceof Ci.nsIRDFResource) || this.containerEmpty(rdfNodeTabs)) {
- alert(TabmixSvc.getSMString("sm.restoreError.msg0") + "\n" + TabmixSvc.getSMString("sm.restoreError.msg1"));
+ let msg = TabmixSvc.getSMString("sm.restoreError.msg0") + "\n" +
+ TabmixSvc.getSMString("sm.restoreError.msg1");
+ let title = TabmixSvc.getString("sm.title");
+ Services.prompt.alert(window, title, msg);
return;
}
@@ -3602,7 +3605,7 @@ try {
data.properties += "11111";
}
if ("attributes" in tabState && tabState.attributes) {
- delete tabState.attributes["_locked"];
+ delete tabState.attributes._locked;
for (var name in tabState.attributes) {
data.properties += " " + name + "=" + encodeURI(tabState.attributes[name]);
}
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 4b91d0f..5fb2f00 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -517,7 +517,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
* @returns closed tab data at aIndex.
*/
getClosedTabAtIndex: function ct_getClosedTabAtIndex(aIndex) {
- if (0 > aIndex || aIndex >= this.count)
+ if (aIndex < 0 || aIndex >= this.count)
return null;
// update our session data
if (TabmixSessionManager.enableBackup)
@@ -623,7 +623,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
index = 0;
if (Tabmix._restoreMultipleTabs)
numberOfTabsToUndoClose = TabmixSvc.ss.getNumberOfTabsClosedLast(window);
- } else if (0 > index || index >= this.count)
+ } else if (index < 0 || index >= this.count)
return null;
let tab = null;
@@ -850,9 +850,9 @@ var TabmixConvertSession = { // jshint ignore:line
tabData.disallow = disallow.join(",");
tabData.attributes = {};
if (tabProperties.charAt(0) == "1" && properties.indexOf("protected=") == -1)
- tabData.attributes["protected"] = "true";
+ tabData.attributes.protected = "true";
if (properties.indexOf("_locked=") == -1)
- tabData.attributes["_locked"] = (tabProperties.charAt(1) == "1");
+ tabData.attributes._locked = (tabProperties.charAt(1) == "1");
var extData = {};
if (properties.length > booleanAttrLength) {
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index f502784..ba6ac33 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -976,8 +976,8 @@ Tabmix.tabsUtils = {
return 1;
// some theme add marginTop/marginBottom to tabs
var cStyle = window.getComputedStyle(aTab, null);
- var marginTop = parseInt(cStyle["marginTop"]) || 0;
- var marginBottom = parseInt(cStyle["marginBottom"]) || 0;
+ var marginTop = parseInt(cStyle.marginTop) || 0;
+ var marginBottom = parseInt(cStyle.marginBottom) || 0;
height += marginTop + marginBottom;
var tabBottom = top - marginTop + height;
@@ -1275,8 +1275,8 @@ var gTMPprefObserver = {
}
gBrowser.tabContainer.mTabMaxWidth = tabMaxWidth;
gBrowser.tabContainer.mTabMinWidth = tabMinWidth;
- this.dynamicRules["width"].style.setProperty("max-width", tabMaxWidth + "px", "important");
- this.dynamicRules["width"].style.setProperty("min-width", tabMinWidth + "px", "important");
+ this.dynamicRules.width.style.setProperty("max-width", tabMaxWidth + "px", "important");
+ this.dynamicRules.width.style.setProperty("min-width", tabMinWidth + "px", "important");
// fix bug in classiccompact
if (typeof classiccompactoptions == "object" &&
Services.prefs.getCharPref("general.skins.selectedSkin") == "classiccompact") {
@@ -1514,7 +1514,6 @@ var gTMPprefObserver = {
default:
break;
}
-
},
getStyleSheets: function TMP_PO_getStyleSheet(aHerf, aFirst) {
@@ -1762,7 +1761,7 @@ var gTMPprefObserver = {
gBrowser._switcher.visibleTab : gBrowser.selectedTab;
let bgMiddle = document.getAnonymousElementByAttribute(selectedTab, "class", "tab-background-middle");
let margin = (-parseFloat(window.getComputedStyle(bgMiddle).borderLeftWidth)) + "px";
- let bgMiddleMargin = this.dynamicRules["bgMiddleMargin"];
+ let bgMiddleMargin = this.dynamicRules.bgMiddleMargin;
if (bgMiddleMargin) {
bgMiddleMargin.style.MozMarginStart = margin;
bgMiddleMargin.style.MozMarginEnd = margin;
@@ -1857,7 +1856,7 @@ var gTMPprefObserver = {
var showOnTabs = Tabmix.prefs.getBoolPref("progressMeter");
var attribValue = null;
if (showOnTabs)
- attribValue = TabmixSvc.tabStylePrefs["progressMeter"].bg ? "userColor" : "defaultColor";
+ attribValue = TabmixSvc.tabStylePrefs.progressMeter.bg ? "userColor" : "defaultColor";
Tabmix.setItem(gBrowser.tabContainer, "tabmix_progressMeter", attribValue);
TabmixProgressListener.listener.showProgressOnTab = showOnTabs;
},
@@ -2500,7 +2499,7 @@ try {
// capture gfx.direct2d.disabled value on first window
// see getter at TabmixSvc
- var tmp = TabmixSvc.direct2dDisabled; // jshint ignore:line
+ void TabmixSvc.direct2dDisabled;
},
updateTabClickingOptions: function() {
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 7193cb1..32a6ab8 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -938,7 +938,6 @@ var TMP_eventListener = {
_tab.classList.remove("standout");
break;
}
-
}
tab.classList.add("standout");
}
diff --git a/defaults/preferences/tabmix.js b/defaults/preferences/tabmix.js
index ac911cc..06649a1 100644
--- a/defaults/preferences/tabmix.js
+++ b/defaults/preferences/tabmix.js
@@ -1,3 +1,5 @@
+/* eslint strict: 0 */
+
pref("extensions.tabmix.disableIncompatible", true);
pref("extensions.tabmix.linkTarget", false);
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index d8898ce..36c6245 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -123,7 +123,7 @@ var ContentClickInternal = {
receiveMessage: function(message) {
if (message.name == "Tabmix:isFrameInContentResult") {
this.isFrameInContent.result(message.target, message.data);
- return;
+ return null;
}
if (message.name != "TabmixContent:Click")
return null;
@@ -261,7 +261,7 @@ var ContentClickInternal = {
return this._attributes[att] || null;
};
return nObj;
- }
+ };
return node ? wrapNode(node, getTargetIsFrame) : null;
},
@@ -340,7 +340,7 @@ var ContentClickInternal = {
eventWhere = this._window.whereToOpenLink(event);
if (/^save|window/.test(eventWhere)) {
// make sure to trigger hrefFromOnClick getter
- this._data.hrefFromOnClick; // jshint ignore:line
+ void this._data.hrefFromOnClick;
return [eventWhere + "@2.1"];
}
@@ -392,7 +392,7 @@ var ContentClickInternal = {
*/
if (this.divertMiddleClick()) {
// make sure to trigger hrefFromOnClick getter
- this._data.hrefFromOnClick; // jshint ignore:line
+ void this._data.hrefFromOnClick;
return [onClickInFrame ? "current.frame at 10" : "current at 10"];
}
@@ -596,12 +596,12 @@ var ContentClickInternal = {
try {
// Greasemonkey >= 0.9.10
Cu.import("resource://greasemonkey/util.js");
- if ('function' == typeof window.GM_util.getEnabled) {
+ if (typeof window.GM_util.getEnabled == 'function') {
GM_function = window.GM_util.getEnabled;
}
} catch (e) {
// Greasemonkey < 0.9.10
- if ('function' == typeof window.GM_getEnabled) {
+ if (typeof window.GM_getEnabled == 'function') {
GM_function = window.GM_getEnabled;
}
}
diff --git a/modules/DownloadLastDir.jsm b/modules/DownloadLastDir.jsm
index 56e142b..c9434a2 100644
--- a/modules/DownloadLastDir.jsm
+++ b/modules/DownloadLastDir.jsm
@@ -1,6 +1,7 @@
/// "use strict";
/* jshint strict: false */
+/* eslint strict: 0 */
this.EXPORTED_SYMBOLS = ["TabmixDownloadLastDir"];
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index c1ae847..5db384b 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -325,11 +325,12 @@ this.DynamicRules = {
else
value = undefined;
}
- if (value === undefined)
- prefValues[item] = item == "bgTopColor" ? prefValues["bgColor"] :
+ if (value === undefined) {
+ prefValues[item] = item == "bgTopColor" ? prefValues.bgColor :
defaultPrefValues[item];
- else
+ } else {
prefValues[item] = value;
+ }
}
let newPrefString = TabmixSvc.JSON.stringify(prefValues);
if (prefString != newPrefString)
diff --git a/modules/MergeWindows.jsm b/modules/MergeWindows.jsm
index af899df..13d5647 100644
--- a/modules/MergeWindows.jsm
+++ b/modules/MergeWindows.jsm
@@ -7,7 +7,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://tabmixplus/Services.jsm");
-/*////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
// The Original Code is the Merge Window function of "Duplicate Tab"//
// extension for Mozilla Firefox. //
// version 0.5.1 //
@@ -16,7 +16,7 @@ Cu.import("resource://tabmixplus/Services.jsm");
// //
// Convert to module and modfied by onemen //
// //
-*/////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
this.MergeWindows = {
get prefs() {
delete this.prefs;
@@ -166,7 +166,7 @@ this.MergeWindows = {
let newTab = tabbrowser.addTab("about:blank", {dontMove: isPopup});
let newBrowser = newTab.linkedBrowser;
newBrowser.stop();
- newBrowser.docShell; // jshint ignore:line
+ void newBrowser.docShell;
if (tab.hasAttribute("_TMP_selectAfterMerege")) {
tab.removeAttribute("_TMP_selectAfterMerege");
tabToSelect = newTab;
diff --git a/modules/Services.jsm b/modules/Services.jsm
index 6a4d12e..e2cce94 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -124,7 +124,9 @@ this.TabmixSvc = {
} catch (ex) {
try {
return "decode" in this.nsIJSON ? this.nsIJSON.decode(str) : null;
- } catch (er) {return null}
+ } catch (er) {
+ return null;
+ }
}
},
stringify: function TMP_stringify(obj) {
@@ -133,7 +135,9 @@ this.TabmixSvc = {
} catch (ex) {
try {
return "encode" in this.nsIJSON ? this.nsIJSON.encode(obj) : null;
- } catch (er) {return null}
+ } catch (er) {
+ return null;
+ }
}
}
},
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index bd22e22..2ffb8e8 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -51,20 +51,19 @@ this.SingleWindowModeUtils = {
newWindow: function(aWindow) {
if (!aWindow.Tabmix.singleWindowMode)
- return;
+ return false;
if (!aWindow.arguments || aWindow.arguments.length === 0)
- return;
+ return false;
this.initService();
- var _this = this;
aWindow.addEventListener("load", function _onLoad(aEvent) {
let win = aEvent.currentTarget;
win.removeEventListener("load", _onLoad, false);
let docElement = win.document.documentElement;
if (docElement.getAttribute("windowtype") == "navigator:browser")
- _this.onLoad(win);
- }, false);
+ this.onLoad(win);
+ }.bind(this), false);
aWindow.gTMPprefObserver.setLink_openPrefs();
diff --git a/modules/extensions/CompatibilityCheck.jsm b/modules/extensions/CompatibilityCheck.jsm
index 1207a70..b690ca6 100644
--- a/modules/extensions/CompatibilityCheck.jsm
+++ b/modules/extensions/CompatibilityCheck.jsm
@@ -176,6 +176,7 @@ CompatibilityCheck.prototype = {
}
},
+ /* eslint dot-notation: 0 */
getList: function TMP_EX_getList() {
var guid_list = {};
/*
--
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