[Pkg-mozext-commits] [tabmixplus] 39/107: Fix some eslint operator-linebreak and no-unneeded-ternary warnings
David Prévot
taffit at moszumanska.debian.org
Tue Dec 29 19:02:48 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 e764ab74a853d7bcdd7cd10d67cda521373c8bbc
Author: onemen <tabmix.onemen at gmail.com>
Date: Fri Oct 30 11:34:54 2015 +0200
Fix some eslint operator-linebreak and no-unneeded-ternary warnings
---
chrome/content/flst/lasttab.js | 2 +-
chrome/content/minit/tablib.js | 4 ++--
chrome/content/places/places.js | 2 +-
modules/DynamicRules.jsm | 2 +-
modules/Services.jsm | 6 ++++--
5 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index 8ab9832..46fc875 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -346,7 +346,7 @@ var TMP_LastTab = {
var mostRecentlyUsed = Services.prefs.getBoolPref("browser.ctrlTab.previews");
var tabPreviews = document.getElementById("ctrlTab-panel") && "ctrlTab" in window;
if (tabPreviews) {
- var tabPreviewsCurentStatus = ctrlTab._recentlyUsedTabs ? true : false;
+ var tabPreviewsCurentStatus = !!ctrlTab._recentlyUsedTabs;
tabPreviews = mostRecentlyUsed && Tabmix.prefs.getBoolPref("lasttab.tabPreviews");
if (tabPreviewsCurentStatus != tabPreviews) {
if (tabPreviews) {
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 59d8799..39064bc 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -899,8 +899,8 @@ var tablib = { // eslint-disable-line
let undoItem = undoItems[i];
if (undoItem && m.hasAttribute("targetURI")) {
let otherTabsCount = undoItem.tabs.length - 1;
- let label = (otherTabsCount === 0) ? menuLabelStringSingleTab
- : PluralForm.get(otherTabsCount, menuLabelString);
+ let label = (otherTabsCount === 0) ?
+ menuLabelStringSingleTab : PluralForm.get(otherTabsCount, menuLabelString);
TMP_SessionStore.getTitleForClosedWindow(undoItem);
let menuLabel = label.replace("#1", undoItem.title)
.replace("#2", otherTabsCount);
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 8ec1483..12f0ef6 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -140,7 +140,7 @@ var TMP_Places = {
isBookmarklet: function(url) {
var jsURL = /^ *javascript:/;
- return jsURL.test(url) ? true : false;
+ return jsURL.test(url);
},
fixWhereToOpen: function(aEvent, aWhere, aPref) {
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index 6c38d1e..8ea1dde 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -384,7 +384,7 @@ this.DynamicRules = {
}
else if (value !== undefined && typeof value != "boolean") {
if (/^true$|^false$/.test(value.replace(/[\s]/g, "")))
- value = value == "true" ? true : false;
+ value = value == "true";
else
value = undefined;
}
diff --git a/modules/Services.jsm b/modules/Services.jsm
index 7795c01..39c1c20 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -266,8 +266,10 @@ XPCOMUtils.defineLazyGetter(TabmixSvc.JSON, "nsIJSON", function() {
// check if australis tab shape is implemented
XPCOMUtils.defineLazyGetter(TabmixSvc, "australis", function() {
- return this.topWin().document.getElementById("tab-curve-clip-path-start") ?
- true : false;
+ if (this.topWin().document.getElementById("tab-curve-clip-path-start")) {
+ return true;
+ }
+ return false;
});
XPCOMUtils.defineLazyGetter(TabmixSvc, "prefs", function() {
--
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