[Pkg-mozext-commits] [tabmixplus] 54/107: Apply Eslint rule: block-scoped-var

David Prévot taffit at moszumanska.debian.org
Tue Dec 29 19:02:50 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 f669e043f7b3692d193bc603435ea0b0223551d1
Author: onemen <tabmix.onemen at gmail.com>
Date:   Thu Nov 5 15:01:26 2015 +0200

    Apply Eslint rule: block-scoped-var
---
 .eslintrc                         | 2 +-
 chrome/content/about.js           | 5 +++--
 modules/SingleWindowModeUtils.jsm | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.eslintrc b/.eslintrc
index c5bce09..0169c93 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -141,7 +141,7 @@
         "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
         "no-with": 2,
 
-        "block-scoped-var": 0,
+        "block-scoped-var": 2,
         "brace-style": [2, "1tbs"],
         "camelcase": 0,
         // TODO - maybe in the future
diff --git a/chrome/content/about.js b/chrome/content/about.js
index 3cce609..2ff7aca 100644
--- a/chrome/content/about.js
+++ b/chrome/content/about.js
@@ -4,10 +4,11 @@
 function init() { // jshint ignore:line
   var addon = window.arguments[0];
   var extensionsStrings = document.getElementById("extensionsStrings");
+  var extensionVersion, currentVersion;
   document.title = extensionsStrings.getFormattedString("aboutWindowTitle", ["Tab Mix Plus"]);
   try {
-    var currentVersion = addon.version;
-    var extensionVersion = document.getElementById("extensionVersion");
+    currentVersion = addon.version;
+    extensionVersion = document.getElementById("extensionVersion");
     extensionVersion.value = extensionsStrings.getFormattedString("aboutWindowVersionString", [currentVersion]);
   } catch (ex) {
     extensionVersion.hidden = true;
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index 3ea4632..ed51582 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -144,10 +144,11 @@ this.SingleWindowModeUtils = {
     else
       urls = uriToLoad ? uriToLoad.split("|") : ["about:blank"];
 
+    var firstTabAdded;
     try {
       // open the tabs in current window
       if (urls.length) {
-        var firstTabAdded = existingBrowser.selectedTab;
+        firstTabAdded = existingBrowser.selectedTab;
         let isBlankTab = existingBrowser.isBlankNotBusyTab(firstTabAdded);
         if (isBlankTab)
           existingWindow.openLinkIn(urls[0], "current", params);

-- 
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