[Pkg-mozext-commits] [tabmixplus] 85/147: Fix some linting warnings
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit c2e884140d7e3783c7282489d036f68461722c80
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Jan 2 21:55:40 2017 +0200
Fix some linting warnings
---
chrome/content/preferences/events.js | 2 +-
chrome/content/session/session.js | 2 +-
chrome/content/tab/scrollbox.xml | 25 +++++++++++++++----------
modules/TabGroupsMigrator.jsm | 2 +-
4 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/chrome/content/preferences/events.js b/chrome/content/preferences/events.js
index 4bc2499..965c33c 100644
--- a/chrome/content/preferences/events.js
+++ b/chrome/content/preferences/events.js
@@ -145,7 +145,7 @@ var gEventsPane = {
loadProgressively: {
syncToCheckBox(item) {
let preference = $(item.getAttribute("preference"));
- if (preference.value == 0) {
+ if (preference.value === 0) {
preference.value = 1;
}
if (preference.hasAttribute("notChecked")) {
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index c52fa97..9f491f1 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -3219,7 +3219,7 @@ TabmixSessionManager = {
in the session.
*/
var cTab = gBrowser.mCurrentTab;
- if (!winData.tabs || winData.tabs.length == 0) {
+ if (!winData.tabs || winData.tabs.length === 0) {
let msg = TabmixSvc.getSMString("sm.restoreError.msg0") + "\n" +
TabmixSvc.getSMString("sm.restoreError.msg1");
let title = TabmixSvc.getSMString("sm.title");
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 1b962d5..6d9e4f9 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -13,8 +13,8 @@
oncontextmenu="TabmixAllTabs.createScrollButtonTabsList(event, 'left');"
anonid="scrollbutton-up-right"
onclick="gBrowser.tabContainer.mTabstrip._distanceScroll(event);"
- onmousedown="if (event.button == 0) gBrowser.tabContainer.mTabstrip._startScroll(-1);"
- onmouseup="if (event.button == 0) gBrowser.tabContainer.mTabstrip._stopScroll();"
+ onmousedown="if (event.button === 0) gBrowser.tabContainer.mTabstrip._startScroll(-1);"
+ onmouseup="if (event.button === 0) gBrowser.tabContainer.mTabstrip._stopScroll();"
onmouseover="gBrowser.tabContainer.mTabstrip._continueScroll(-1);"
onmouseout="gBrowser.tabContainer.mTabstrip._pauseScroll();"/>
<xul:toolbarbutton class="scrollbutton-down"
@@ -22,8 +22,8 @@
oncontextmenu="TabmixAllTabs.createScrollButtonTabsList(event, 'right');"
anonid="scrollbutton-down-right"
onclick="gBrowser.tabContainer.mTabstrip._distanceScroll(event);"
- onmousedown="if (event.button == 0) gBrowser.tabContainer.mTabstrip._startScroll(1);"
- onmouseup="if (event.button == 0) gBrowser.tabContainer.mTabstrip._stopScroll();"
+ onmousedown="if (event.button === 0) gBrowser.tabContainer.mTabstrip._startScroll(1);"
+ onmouseup="if (event.button === 0) gBrowser.tabContainer.mTabstrip._stopScroll();"
onmouseover="gBrowser.tabContainer.mTabstrip._continueScroll(1);"
onmouseout="gBrowser.tabContainer.mTabstrip._pauseScroll();"/>
</content>
@@ -273,8 +273,11 @@
<parameter name="px"/>
<parameter name="aSmoothScroll"/>
<body><![CDATA[
- var newPx = (this._isScrolling || aSmoothScroll) ? px : this._distanceToRow(px);
- this.scrollPosition += newPx;
+ if (this._isScrolling || aSmoothScroll) {
+ this.scrollPosition += px;
+ } else {
+ this.scrollPosition += this._distanceToRow(px);
+ }
]]></body>
</method>
@@ -283,7 +286,7 @@
<parameter name="amountToScroll"/>
<body><![CDATA[
var offset = 0, isScrollingLeft = amountToScroll > 0;
- if (amountToScroll != 0 && this.offsetAmountToScroll &&
+ if (amountToScroll !== 0 && this.offsetAmountToScroll &&
!this.isMultiRow) {
let tab;
if (isScrollingLeft)
@@ -462,8 +465,9 @@
<field name="firstTabInRowMargin">0</field>
<method name="resetFirstTabInRow">
<body><![CDATA[
- if (this.firstTabInRowMargin == 0)
+ if (this.firstTabInRowMargin === 0) {
return;
+ }
this.firstTabInRowMargin = 0;
// getElementsByAttribute return a live nodList
// each time we remove the attribute we remove node from the list
@@ -516,7 +520,7 @@
this.blockUnderflow = false;
return;
}
- } else if (event.detail == 0) {
+ } else if (event.detail === 0) {
// horizontal scrollbox - Ignore vertical events
return;
}
@@ -547,8 +551,9 @@
}
} else {
// horizontal scrollbox - Ignore vertical events
- if (event.detail == 0)
+ if (event.detail === 0) {
return;
+ }
if (this.isMultiRow && !this._enterVerticalModeTimeout) {
this.__needToSetVerticalOrient = true;
// when widthFitTitle is false we enter vertical mode only after we are in overflow
diff --git a/modules/TabGroupsMigrator.jsm b/modules/TabGroupsMigrator.jsm
index 53d471a..0299ca5 100644
--- a/modules/TabGroupsMigrator.jsm
+++ b/modules/TabGroupsMigrator.jsm
@@ -91,7 +91,7 @@ this.TabmixGroupsMigrator = {
return;
}
- if (bookmark && index == 0) {
+ if (bookmark && index === 0) {
bookmarkGroups(session);
}
--
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