[Pkg-mozext-commits] [tabmixplus] 04/107: Start using ESLint fix spaces and space after typeof

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 74c7f7e57375a129e9f1b4b93e2488238ca26dce
Author: onemen <tabmix.onemen at gmail.com>
Date:   Fri Aug 14 23:37:33 2015 +0300

    Start using ESLint fix spaces and space after typeof
---
 chrome/content/changecode.js              |  2 +-
 chrome/content/extensions/extensions.js   | 24 ++++++------
 chrome/content/extensions/sage.js         |  2 +-
 chrome/content/flst/lasttab.js            |  4 +-
 chrome/content/minit/autoReload.js        |  2 +-
 chrome/content/minit/minit.js             |  6 +--
 chrome/content/minit/tabView.js           |  2 +-
 chrome/content/minit/tablib.js            |  9 +++--
 chrome/content/places/places.js           |  2 +-
 chrome/content/preferences/preferences.js | 34 +++++++++--------
 chrome/content/session/session.js         | 62 +++++++++++++++----------------
 chrome/content/session/sessionStore.js    |  6 +--
 chrome/content/tab/tab.js                 | 10 ++---
 chrome/content/utils.js                   | 14 +++----
 modules/AutoReload.jsm                    |  8 ++--
 modules/ContentClick.jsm                  | 10 ++---
 modules/DocShellCapabilities.jsm          |  2 +-
 modules/Shortcuts.jsm                     |  4 +-
 modules/SingleWindowModeUtils.jsm         |  2 +-
 modules/log.jsm                           |  4 +-
 20 files changed, 106 insertions(+), 103 deletions(-)

diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index 5ecad32..2b9c9d4 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -48,7 +48,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
           substr = new RegExp(substr.replace(/[{[(\\^.$|?*+\/)\]}]/g, "\\$&"), flags);
       }
 
-      var exist = typeof(substr) == "string" ? this.value.indexOf(substr) > -1 : substr.test(this.value);
+      var exist = typeof (substr) == "string" ? this.value.indexOf(substr) > -1 : substr.test(this.value);
       if (exist) {
         this.value = this.value.replace(substr, newString);
         this.needUpdate = true;
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index 46a2deb..04533f4 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -53,9 +53,9 @@ var TMP_extensionsCompatibility = {
 
     // fix for Cluster Tabs - Cluster Tab look for TM_init
     // https://addons.mozilla.org/en-US/firefox/addon/cluster-tabs-for-firefox/
-    if ("GlaxChrome" in window && typeof(window.GlaxChrome) == "object") {
+    if ("GlaxChrome" in window && typeof (window.GlaxChrome) == "object") {
       document.getElementById("main-window").setAttribute("gscltTMPinstalled", true);
-      let func = ["_setupForOtherExtensions","enableCustomDragDropMode"];
+      let func = ["_setupForOtherExtensions", "enableCustomDragDropMode"];
       let GlaxChrome = window.GlaxChrome.CLT.DragDropManager;
       func.forEach(function(aFn) {
         if (aFn in GlaxChrome) {
@@ -80,7 +80,7 @@ var TMP_extensionsCompatibility = {
 
     // https://addons.mozilla.org/en-US/firefox/addon/second-search/
     if ("SecondSearchBrowser" in window && SecondSearchBrowser.prototype) {
-      let func = ["canOpenNewTab","loadForSearch","checkToDoSearch"];
+      let func = ["canOpenNewTab", "loadForSearch", "checkToDoSearch"];
       let SSB = SecondSearchBrowser.prototype;
       func.forEach(function(aFn) {
         if (aFn in SSB && SSB[aFn].toString().indexOf("TM_init") != -1) {
@@ -115,7 +115,7 @@ var TMP_extensionsCompatibility = {
 
     // workaround for extensions that look for updateIcon
     // Favicon Picker 2
-    if (typeof(gBrowser.updateIcon) == "undefined") {
+    if (typeof (gBrowser.updateIcon) == "undefined") {
       gBrowser.updateIcon = function updateIcon (aTab) {
         var browser = gBrowser.getBrowserForTab(aTab);
         if ((browser.mIconURL || "") != aTab.getAttribute("image")) {
@@ -131,7 +131,7 @@ var TMP_extensionsCompatibility = {
 
     /*
     // https://addons.mozilla.org/en-US/firefox/addon/tab-flick/
-    if ("TabFlick" in window && typeof(TabFlick.openPanel) == "function") {
+    if ("TabFlick" in window && typeof (TabFlick.openPanel) == "function") {
       Tabmix.changeCode(TMP_tabDNDObserver, "TMP_tabDNDObserver.onDragEnd")._replace(
         'gBrowser.replaceTabWithWindow(draggedTab);',
         'gBrowser.selectedTab = draggedTab; TabFlick.openPanel(aEvent);'
@@ -152,7 +152,7 @@ var TMP_extensionsCompatibility = {
         '  f.gBrowser.TMP_selectNewForegroundTab(newTab, false);' +
         '  TMP_LastTab.PushSelectedTab();' +
         '}';
-      if (typeof(foxTab.openNewTab) == "function") {
+      if (typeof (foxTab.openNewTab) == "function") {
         Tabmix.changeCode(foxTab, "foxTab.openNewTab")._replace(
           '{', loadNewInBackground
         )._replace(
@@ -168,7 +168,7 @@ var TMP_extensionsCompatibility = {
           'if( !loadNewInBackground) $&'
         ).toCode();
       }
-      if (typeof(foxTab.showNewTabMessage) == "function") {
+      if (typeof (foxTab.showNewTabMessage) == "function") {
         Tabmix.changeCode(foxTab, "foxTab.showNewTabMessage")._replace(
           '{', loadNewInBackground
         )._replace(
@@ -219,7 +219,7 @@ var TMP_extensionsCompatibility = {
     if ("RSSTICKER" in window)
       this.RSSTICKER.init();
 
-    if ("PersonaController" in window && typeof(window.PersonaController) == "object") {
+    if ("PersonaController" in window && typeof (window.PersonaController) == "object") {
       Tabmix.changeCode(PersonaController, "PersonaController._applyPersona")._replace(
         /(\})(\)?)$/,
         'if (TabmixTabbar.position == 1) {\
@@ -317,7 +317,7 @@ var TMP_extensionsCompatibility = {
     }
 
     // for MR Tech's local install extention
-    if (typeof(Local_Install) == "object") {
+    if (typeof (Local_Install) == "object") {
       // don't open trober in current tab when tab is locked
       // or trober is to diffrent site then the current
       Tabmix.changeCode(Local_Install, "Local_Install.openThrobber")._replace(
@@ -510,9 +510,9 @@ TMP_extensionsCompatibility.wizzrss = {
     this.started = true;
     var codeToReplace = /getContentBrowser\(\).loadURI|contentBrowser.loadURI/g;
     const newCode = "TMP_extensionsCompatibility.wizzrss.openURI";
-    var _functions = ["addFeedbase","validate","gohome","tryagain","promptStuff",
-                      "doSearch","viewLog","renderItem","playEnc","renderAllEnc","playAllEnc",
-                      "gotoLink","itemLinkClick","itemListClick"];
+    var _functions = ["addFeedbase", "validate", "gohome", "tryagain", "promptStuff",
+                      "doSearch", "viewLog", "renderItem", "playEnc", "renderAllEnc", "playAllEnc",
+                      "gotoLink", "itemLinkClick", "itemListClick"];
 
     _functions.forEach(function(_function) {
       if (_function in window)
diff --git a/chrome/content/extensions/sage.js b/chrome/content/extensions/sage.js
index 2d7a48d..4ede54c 100644
--- a/chrome/content/extensions/sage.js
+++ b/chrome/content/extensions/sage.js
@@ -41,7 +41,7 @@ var TMP_Sage = {
         Tabmix.changeCode(window, "openURI")._replace(
            'switch (getWindowType(aEvent))',
            'var windowType = getWindowType(aEvent);\
-            windowType = TMP_Places.fixWhereToOpen(aEvent, typeof(windowType) != "string" || !windowType ? "current" : windowType, TMP_Sage.openTabPref); \
+            windowType = TMP_Places.fixWhereToOpen(aEvent, typeof (windowType) != "string" || !windowType ? "current" : windowType, TMP_Sage.openTabPref); \
             switch (windowType)'
         ).toCode();
       }
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index f3b648c..08d50a5 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -163,14 +163,14 @@ var TMP_LastTab = {
          this.OnKeyPress(event);
    },
 
-   set tabs (val) {
+   set tabs(val) {
      if (val !== null)
        return;
 
      this._tabs = null;
    },
 
-   get tabs () {
+   get tabs() {
      if (this._tabs)
        return this._tabs;
      let list = this.handleCtrlTab ? this.TabHistory : gBrowser.tabs;
diff --git a/chrome/content/minit/autoReload.js b/chrome/content/minit/autoReload.js
index 6d80c21..9e46c75 100644
--- a/chrome/content/minit/autoReload.js
+++ b/chrome/content/minit/autoReload.js
@@ -14,7 +14,7 @@ function accept() {
   gPref.setIntPref("extensions.tabmix.reload_time", customReloadTime);
   var list = gPref.getCharPref("extensions.tabmix.custom_reload_list");
   list = list ? list.split(",") : [];
-  let defaultList = [60,120,300,900,1800];
+  let defaultList = [60, 120, 300, 900, 1800];
   if (list.concat(defaultList).indexOf(customReloadTime) == -1) {
     list.push(customReloadTime);
     if (list.length > 6)
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index ee04919..7c4966b 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -898,8 +898,8 @@ Tabmix.whereToOpen = function TMP_whereToOpen(pref, altKey) {
    var isBlankTab = gBrowser.isBlankNotBusyTab(aTab);
    var isLockTab = !isBlankTab && aTab.hasAttribute("locked");
 
-   var openTabPref = typeof(pref) == "string" ? Services.prefs.getBoolPref(pref) : pref;
-   if (typeof(altKey) != "undefined") {
+   var openTabPref = typeof (pref) == "string" ? Services.prefs.getBoolPref(pref) : pref;
+   if (typeof (altKey) != "undefined") {
       // don't reuse balnk tab if the user press alt key when the pref is to open in current tab
       if (altKey && !openTabPref)
          isBlankTab = false;
@@ -1203,7 +1203,7 @@ Tabmix.navToolbox = {
       this.urlBarInitialized = obj[fn].toString().indexOf(TMP_fn) > -1;
 
     // For the case Omnibar version 0.7.7.20110418+ change handleCommand before we do.
-    if (_Omnibar && typeof(Omnibar.intercepted_handleCommand) == "function") {
+    if (_Omnibar && typeof (Omnibar.intercepted_handleCommand) == "function") {
       window.Omnibar.intercepted_handleCommand = gURLBar[fn];
       Tabmix.changeCode(Omnibar, "Omnibar.intercepted_handleCommand")._replace(
         'Omnibar.handleSearchQuery',
diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index d62bbd3..bdcbcfd 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -259,7 +259,7 @@
   };
 
   TabmixSessionManager._setTabviewData = function SM__setTabviewData(id, data) {
-    if (typeof(data) != "string")
+    if (typeof (data) != "string")
       data = TabmixSvc.JSON.stringify(data);
     TabmixSvc.ss.setWindowValue(window, id, data);
     if (!this.enableBackup)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 6e37482..4739b62 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -1463,7 +1463,7 @@ var tablib = {
         return true;
       var closing = this.closingTabsEnum;
       // try to cach call from other extensions to warnAboutClosingTabs (before Firefox 24)
-      if (typeof(whatToClose) == "boolean")
+      if (typeof (whatToClose) == "boolean")
         whatToClose = whatToClose ? closing.ALL_ONEXIT : closing.OTHER;
 
       var onExit = whatToClose == closing.ALL_ONEXIT;
@@ -1727,9 +1727,9 @@ var tablib = {
 
   // prevent 'ReferenceError: reference to undefined property params'
   // in gBrowser.addTab
-  props: ["referrerURI","charset","postData","ownerTab",
-          "allowThirdPartyFixup","fromExternal","relatedToCurrent",
-          "allowMixedContent","skipAnimation","isUTF8","dontMove","isPending",
+  props: ["referrerURI", "charset", "postData", "ownerTab",
+          "allowThirdPartyFixup", "fromExternal", "relatedToCurrent",
+          "allowMixedContent", "skipAnimation", "isUTF8", "dontMove", "isPending",
           "aForceNotRemote", "aNoReferrer"],
 
   definedParams: function(params) {
@@ -1962,3 +1962,4 @@ Tabmix.getOpenTabNextPref = function TMP_getOpenTabNextPref(aRelatedToCurrent) {
 
   return false;
 };
+
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 14b3d21..944137d 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -223,7 +223,7 @@ var TMP_Places = {
       var tabBrowser = w.gBrowser;
       var aTab = tabBrowser.mCurrentTab;
 
-      if (typeof(aPref) == "undefined")
+      if (typeof (aPref) == "undefined")
          aPref = this.getPrefByDocumentURI(window);
 
       var _pref = w.Services.prefs;
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index bdf441a..0d466f3 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -204,7 +204,7 @@ var gPrefWindow = { // jshint ignore:line
   },
 
   setDisabled: function(itemOrId, val) {
-    var item = typeof(itemOrId) == "string" ? $(itemOrId) : itemOrId;
+    var item = typeof (itemOrId) == "string" ? $(itemOrId) : itemOrId;
     if (!item)
       return;
     if (item.hasAttribute("inverseDependency"))
@@ -306,7 +306,7 @@ function setPrefAfterImport(aPref) {
     // we use browser.tabs.closeButtons only in 0.3.8.3
     if (aPref.value < 0 || aPref.value > 6)
       aPref.value = 6;
-    aPref.value = [3,5,1,1,2,4,1][aPref.value];
+    aPref.value = [3, 5, 1, 1, 2, 4, 1][aPref.value];
     Tabmix.prefs.setIntPref("tabs.closeButtons", aPref.value);
     return true;
   }
@@ -344,20 +344,22 @@ let sessionPrefs = ["browser.sessionstore.resume_from_crash",
 
 XPCOMUtils.defineLazyGetter(window, "gPreferenceList", function() {
   // other settings not in extensions.tabmix. branch that we save
-  let otherPrefs = ["browser.allTabs.previews","browser.ctrlTab.previews",
-  "browser.link.open_newwindow","browser.link.open_newwindow.override.external",
-  "browser.link.open_newwindow.restriction",TabmixSvc.newtabUrl,
-  "browser.search.context.loadInBackground","browser.search.openintab",
-  "browser.sessionstore.interval","browser.sessionstore.max_tabs_undo",
-  "browser.sessionstore.postdata","browser.sessionstore.privacy_level",
-  "browser.sessionstore.restore_on_demand",
-  "browser.sessionstore.resume_from_crash","browser.startup.page",
-  "browser.tabs.animate","browser.tabs.closeWindowWithLastTab",
-  "browser.tabs.insertRelatedAfterCurrent","browser.tabs.loadBookmarksInBackground",
-  "browser.tabs.loadDivertedInBackground","browser.tabs.loadInBackground",
-  "browser.tabs.tabClipWidth","browser.tabs.tabMaxWidth","browser.tabs.tabMinWidth",
-  "browser.tabs.warnOnClose","browser.warnOnQuit",
-  "toolkit.scrollbox.clickToScroll.scrollDelay","toolkit.scrollbox.smoothScroll"];
+  let otherPrefs = [
+    "browser.allTabs.previews", "browser.ctrlTab.previews",
+    "browser.link.open_newwindow", "browser.link.open_newwindow.override.external",
+    "browser.link.open_newwindow.restriction", TabmixSvc.newtabUrl,
+    "browser.search.context.loadInBackground", "browser.search.openintab",
+    "browser.sessionstore.interval", "browser.sessionstore.max_tabs_undo",
+    "browser.sessionstore.postdata", "browser.sessionstore.privacy_level",
+    "browser.sessionstore.restore_on_demand",
+    "browser.sessionstore.resume_from_crash", "browser.startup.page",
+    "browser.tabs.animate", "browser.tabs.closeWindowWithLastTab",
+    "browser.tabs.insertRelatedAfterCurrent", "browser.tabs.loadBookmarksInBackground",
+    "browser.tabs.loadDivertedInBackground", "browser.tabs.loadInBackground",
+    "browser.tabs.tabClipWidth", "browser.tabs.tabMaxWidth", "browser.tabs.tabMinWidth",
+    "browser.tabs.warnOnClose", "browser.warnOnQuit",
+    "toolkit.scrollbox.clickToScroll.scrollDelay", "toolkit.scrollbox.smoothScroll"
+  ];
 
   if (!Tabmix.isVersion(200))
     otherPrefs.push("browser.warnOnRestart");
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index b26f08f..b0f18a0 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -114,11 +114,11 @@ Tabmix.Sanitizer = {
 };
 
 var TabmixSessionData = { // jshint ignore:line
-   docShellItems: ["Images","Subframes","MetaRedirects","Plugins","Javascript"],
-   tabAttribute: ["protected","locked"],
+   docShellItems: ["Images", "Subframes", "MetaRedirects", "Plugins", "Javascript"],
+   tabAttribute: ["protected", "locked"],
 
    getTabProperties: function sData_getTabProperties(aTab, checkPref) {
-      if (typeof(checkPref) == "undefined") checkPref = false; // pref check is only for session manager
+      if (typeof (checkPref) == "undefined") checkPref = false; // pref check is only for session manager
       var tabProperties = "", temp;
       for (var j = 0; j < this.tabAttribute.length; j++) {
          temp = aTab.hasAttribute(this.tabAttribute[j]) ? aTab.getAttribute(this.tabAttribute[j]) : "false";
@@ -845,7 +845,7 @@ var TabmixSessionManager = { // jshint ignore:line
       for (i = 0; i < sessionType.length; i++) {
          this.gSessionPath[i] = this.getResourceValue(path + sessionType[i], "session");
       }
-      if (typeof(gBrowser) == "object" && !gBrowser.windowID) {
+      if (typeof (gBrowser) == "object" && !gBrowser.windowID) {
          gBrowser.windowID = this.getAnonymousId();
          this.gThisWin = this.gSessionPath[0] + "/" + gBrowser.windowID;
          this.gThisWinTabs = this.gThisWin + "/tabs";
@@ -901,7 +901,7 @@ var TabmixSessionManager = { // jshint ignore:line
 
    initContainer: function(node) {
      try {
-       if (typeof(node) == "string")
+       if (typeof (node) == "string")
          node = this.RDFService.GetResource(node);
        return this.CONUtils.MakeSeq(this.DATASource, node);
      } catch (e) {
@@ -913,7 +913,7 @@ var TabmixSessionManager = { // jshint ignore:line
     // return true if node is empty container or node is not container
    containerEmpty: function(node) {
      try {
-       if (typeof(node) == "string")
+       if (typeof (node) == "string")
          node = this.RDFService.GetResource(node);
        if (!this.CONUtils.IsContainer(this.DATASource, node))
          return true;
@@ -940,14 +940,14 @@ var TabmixSessionManager = { // jshint ignore:line
    },
 
    getValue: function(node, label, typeID, def) {
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       label = this.getNC(label);
       var rdfNode = this.DATASource.GetTarget(node, label, true);
       return (rdfNode instanceof Components.interfaces[typeID]) ? rdfNode.Value : def;
    },
 
    getLiteralValue: function(node, arc, def) {
-      if (typeof(def) == "undefined") def = "";
+      if (typeof (def) == "undefined") def = "";
       return this.getValue(node, arc, "nsIRDFLiteral", def);
    },
 
@@ -984,23 +984,23 @@ var TabmixSessionManager = { // jshint ignore:line
    },
 
    getIntValue: function(node, arc, def) {
-      if (typeof(def) == "undefined") def = 0;
+      if (typeof (def) == "undefined") def = 0;
       return this.getValue(node, arc, "nsIRDFInt", def);
    },
 
    getResourceValue: function(node, arc, def) {
-      if (typeof(def) == "undefined") def = null;
+      if (typeof (def) == "undefined") def = null;
       return this.getValue(node, arc, "nsIRDFResource", def);
    },
 
    getResource: function(node, arc) {
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       arc = this.getNC(arc);
       return this.DATASource.GetTarget(node, arc, true);
    },
 
    nodeHasArc: function(node, arc) {
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       arc = this.getNC(arc);
       return this.DATASource.hasArcOut(node, arc);
    },
@@ -1010,23 +1010,23 @@ var TabmixSessionManager = { // jshint ignore:line
          this.removeAttribute(node, arc);
          return;
       }
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       arc = this.getNC(arc);
       value = this.RDFService.GetLiteral(value);
       this.changeValue(node, arc, value);
    },
 
    setIntLiteral: function(node, arc, value) {
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       arc = this.getNC(arc);
       value = this.RDFService.GetIntLiteral(value);
       this.changeValue(node, arc, value);
    },
 
    setResource: function(node, arc, value) {
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       arc = this.getNC(arc);
-      if (typeof(value) == "string") value = this.RDFService.GetResource(value);
+      if (typeof (value) == "string") value = this.RDFService.GetResource(value);
       this.changeValue(node, arc, value);
    },
 
@@ -1039,7 +1039,7 @@ var TabmixSessionManager = { // jshint ignore:line
 
    // use it only to remove node with literal value
    removeAttribute: function(node, arc) {
-      if (typeof(node) == "string") node = this.RDFService.GetResource(node);
+      if (typeof (node) == "string") node = this.RDFService.GetResource(node);
       if (this.nodeHasArc(node, arc)) {
          var value = this.getLiteralValue(node, arc);
          this.DATASource.Unassert(node, this.getNC(arc), this.RDFService.GetLiteral(value));
@@ -1588,7 +1588,7 @@ var TabmixSessionManager = { // jshint ignore:line
 
    updateSessionMenu: function(menu) {
       var triggerNode = menu.triggerNode;
-      if (typeof(triggerNode.session) == "undefined")
+      if (typeof (triggerNode.session) == "undefined")
         return false;
 
       var overwriteWindows = this.prefBranch.getBoolPref("restore.overwritewindows") || Tabmix.singleWindowMode;
@@ -1671,7 +1671,7 @@ var TabmixSessionManager = { // jshint ignore:line
    setSessionAsStartup: function(popup) {
       if (popup.getAttribute("checked")) {
          let node = popup.parentNode.triggerNode;
-         var aValue = node.getAttribute("value"); // -1, -2 for for closed session, 1,2.... for saved session
+         var aValue = node.getAttribute("value"); // -1, -2 for for closed session, 1, 2.... for saved session
          var loadsession = aValue && aValue <= -1 ? aValue : 0;
          this.prefBranch.setIntPref("onStart.loadsession", loadsession);
          if (loadsession > -1)
@@ -1800,8 +1800,8 @@ var TabmixSessionManager = { // jshint ignore:line
    deleteWithProp: function(container, prop, value) {
       var containerEnum = container.GetElements();
       var nodeToDelete = [];
-      var noProp = typeof(prop) == "undefined";
-      var valueExist = typeof(value) == "string";
+      var noProp = typeof (prop) == "undefined";
+      var valueExist = typeof (value) == "string";
       while (containerEnum.hasMoreElements()) {
          var node = containerEnum.getNext();
          var propExist = noProp ? true : this.nodeHasArc(node, prop);
@@ -1880,7 +1880,7 @@ var TabmixSessionManager = { // jshint ignore:line
       }
 
       if (!this.DATASource) this.initService(); // initService if we call from pref dialog
-      if (typeof(contents) == "undefined") contents = 0;
+      if (typeof (contents) == "undefined") contents = 0;
       var endSeparator = this.destroyMenuItems(popup, aNoSeparators); // Remove any existing menu items
       var parentId = popup.parentNode.id;
       if (parentId == "btn_sessionmanager" || parentId == "btn_closedwindows")
@@ -1901,7 +1901,7 @@ var TabmixSessionManager = { // jshint ignore:line
 
       var aContainer = this.initContainer(container);
       var containerEnum = aContainer.GetElements();
-      var mi, node, name, nameExt, accessKey,index, nodes = [];
+      var mi, node, name, nameExt, accessKey, index, nodes = [];
       var showNameExt = this.prefBranch.getBoolPref("menu.showext");
       var loadsession = this.prefBranch.getIntPref("onStart.loadsession");
       var sessionpath = this.prefBranch.getCharPref("onStart.sessionpath");
@@ -1958,9 +1958,9 @@ var TabmixSessionManager = { // jshint ignore:line
             var afterCrash = !this.containerEmpty(this.gSessionPath[3]);
             // if Crashed is empty don't show 'Crashed Session' menu item
             if (afterCrash && contents != 1)
-               sessionLabel = ["lastgood 1","previous 2","crashed 3"];
+               sessionLabel = ["lastgood 1", "previous 2", "crashed 3"];
             else
-               sessionLabel = ["last 1","previous 2"];
+               sessionLabel = ["last 1", "previous 2"];
 
             var menu;
             var empty = ", (" + TabmixSvc.getSMString("sm.session.empty") + ")";
@@ -2577,7 +2577,7 @@ try {
       if (!path) path = this.gSessionPath[0];
       if (!caller) caller = "";
       if (!overwriteWindow) overwriteWindow = false;
-      if (typeof(saveClosedTabs) == "undefined") saveClosedTabs = this.saveClosedtabs;
+      if (typeof (saveClosedTabs) == "undefined") saveClosedTabs = this.saveClosedtabs;
       // if we going to delete close window from the list we can't use GetCount as ID,
       // we need to save unink ID
       var winID;
@@ -2686,7 +2686,7 @@ try {
       if (!add0_1) add0_1 = 0;
       for (var i = aTab._tPos + add0_1; i < gBrowser.tabs.length; i++) {
          tab = gBrowser.tabs[i];
-         node = (typeof(label) != "string") ? this.getNodeForTab(tab) : label + "/" + tab.linkedPanel;
+         node = (typeof (label) != "string") ? this.getNodeForTab(tab) : label + "/" + tab.linkedPanel;
          this.setIntLiteral(node, "tabPos", tab._tPos);
       }
    },
@@ -2789,7 +2789,7 @@ try {
       let tab = gBrowser.mCurrentTab;
       if (tab.hasAttribute("inrestore") || this.isTabPrivate(tab))
          return;
-      if (typeof(needFlush) == "undefined") needFlush = false;
+      if (typeof (needFlush) == "undefined") needFlush = false;
       this.initSession(this.gSessionPath[0], this.gThisWin);
       this.setTabsScroll(); // until i find proper event to update tab scroll do it from here
       if (this.prefBranch.getBoolPref("save.selectedtab")) {
@@ -3001,7 +3001,7 @@ try {
       var sessionContainer = this.initContainer(path);
       var sessionEnum = sessionContainer.GetElements();
       var sessionCount = 0, concatenate;
-      if (typeof(overwriteWindows) == "undefined")
+      if (typeof (overwriteWindows) == "undefined")
          overwriteWindows = this.prefBranch.getBoolPref("restore.overwritewindows");
       // don't concatenate window after crash
       if (caller == "firstwindowopen" && this.getLiteralValue(this.gSessionPath[0], "status") == "crash2")
@@ -3092,7 +3092,7 @@ try {
       // don't reopen same window again. the window removed from closed window list after it finish to load
       if (this.nodeHasArc(rdfNodeClosedWindow, "reOpened")) return;
       this.setLiteral(rdfNodeClosedWindow, "reOpened", "true");
-      if (typeof(overwriteWindows) == "undefined")
+      if (typeof (overwriteWindows) == "undefined")
          overwriteWindows = this.prefBranch.getBoolPref("restore.overwritewindows");
       var saveBeforOverwrite = this.prefBranch.getBoolPref("restore.saveoverwrite");
       var overwriteTabs = this.prefBranch.getBoolPref("restore.overwritetabs");
@@ -3636,7 +3636,7 @@ try {
    deleteClosedtabAt: function SM_deleteClosedtabAt(index, winPath) {
       if (!this.prefBranch.getBoolPref("save.closedtabs"))
          return;
-      if (typeof(winPath) == 'undefined')
+      if (typeof (winPath) == 'undefined')
          winPath = this.gThisWin;
       var rdfNodeTabs = this.getResource(winPath, "closedtabs");
       var container = this.initContainer(rdfNodeTabs);
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index c9d60de..4b91d0f 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -332,7 +332,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
    },
 
    setButtonDisableState: function ct_setButtonDisableState(aState) {
-      if (typeof(aState) == "undefined")
+      if (typeof (aState) == "undefined")
          aState = this.count === 0;
       Tabmix.setItem(this.buttonBroadcaster, "disabled", aState || null);
    },
@@ -576,7 +576,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
          aTabToRemove = cTab;
          tabData.pos = cTab._tPos;
       }
-      else if (typeof(aTabToRemove) == "undefined" && gBrowser.isBlankNotBusyTab(cTab))
+      else if (typeof (aTabToRemove) == "undefined" && gBrowser.isBlankNotBusyTab(cTab))
          aTabToRemove = cTab;
 
       if (TMP_TabView.installed)
@@ -838,7 +838,7 @@ var TabmixConvertSession = { // jshint ignore:line
       }
 
       var properties = TabmixSessionManager.getLiteralValue(rdfNodeTab, "properties");
-      var tabAttribute = ["Images","Subframes","MetaRedirects","Plugins","Javascript"];
+      var tabAttribute = ["Images", "Subframes", "MetaRedirects", "Plugins", "Javascript"];
 
       var booleanAttrLength = TabmixSessionData.tabAttribute.length + TabmixSessionData.docShellItems.length;
       var tabProperties = properties.substr(0, booleanAttrLength);
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 3080882..f502784 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -210,7 +210,7 @@ var TabmixTabbar = {
 
   get singleRowHeight() {
     let heights = this._heights[this._tabsPosition];
-    if (typeof(heights) == "undefined")
+    if (typeof (heights) == "undefined")
       return Tabmix.tabsUtils.tabstripInnerbox.getBoundingClientRect().height;
     return heights[2] / 2;
   },
@@ -247,7 +247,7 @@ var TabmixTabbar = {
     }
 
     var newHeight, fillRowsHeights;
-    if (typeof(this._heights[tabsPosition]) == "undefined") {
+    if (typeof (this._heights[tabsPosition]) == "undefined") {
       this._heights[tabsPosition] = {};
       fillRowsHeights = true;
     }
@@ -268,7 +268,7 @@ var TabmixTabbar = {
         newHeight = this.getRowHeight(tabsPosition) * aRows;
 
       this._heights[tabsPosition][aRows] = newHeight;
-      if (fillRowsHeights || (aRows > 2 && typeof(this._heights[tabsPosition][aRows - 1]) == "undefined")) {
+      if (fillRowsHeights || (aRows > 2 && typeof (this._heights[tabsPosition][aRows - 1]) == "undefined")) {
         let rowHeight = newHeight / aRows;
         for (let row = 2; row < aRows; row++)
           this._heights[tabsPosition][row] = rowHeight * row;
@@ -1169,7 +1169,7 @@ var gTMPprefObserver = {
     if (this.preventUpdate)
       return;
     // if we don't have a valid window (closed)
-    if (!(typeof(document) == 'object' && document)) {
+    if (!(typeof (document) == 'object' && document)) {
       this.removeObservers(); // remove the observer..
       return; // ..and don't continue
     }
@@ -2273,7 +2273,7 @@ var gTMPprefObserver = {
       let value = getPrefByType("browser.tabs.closeButtons", 1, "IntPref");
       // these value are from 0.3.8.3. we don't know if 0,1 are also from 0.3.8.3 so we don't use 0,1.
       if (value > 1 && value <= 6) {
-        let newValue = [3,5,1,1,2,4,1][value];
+        let newValue = [3, 5, 1, 1, 2, 4, 1][value];
         Tabmix.prefs.setIntPref("tabs.closeButtons", newValue);
       }
     }
diff --git a/chrome/content/utils.js b/chrome/content/utils.js
index e879b0e..0f99227 100644
--- a/chrome/content/utils.js
+++ b/chrome/content/utils.js
@@ -23,19 +23,19 @@ var Tabmix = { // jshint ignore:line
 
   // Show/hide one item (specified via name or the item element itself).
   showItem: function(aItemOrId, aShow) {
-    var item = typeof(aItemOrId) == "string" ? document.getElementById(aItemOrId) : aItemOrId;
+    var item = typeof (aItemOrId) == "string" ? document.getElementById(aItemOrId) : aItemOrId;
     if (item && item.hidden == aShow)
       item.hidden = !aShow;
   },
 
   setItem: function(aItemOrId, aAttr, aVal) {
-    var elem = typeof(aItemOrId) == "string" ? document.getElementById(aItemOrId) : aItemOrId;
+    var elem = typeof (aItemOrId) == "string" ? document.getElementById(aItemOrId) : aItemOrId;
     if (elem) {
       if (aVal === null || aVal === undefined) {
         elem.removeAttribute(aAttr);
         return;
       }
-      if (typeof(aVal) == "boolean")
+      if (typeof (aVal) == "boolean")
         aVal = aVal ? "true" : "false";
 
       if (!elem.hasAttribute(aAttr) || elem.getAttribute(aAttr) != aVal)
@@ -44,7 +44,7 @@ var Tabmix = { // jshint ignore:line
   },
 
   setAttributeList: function(aItemOrId, aAttr, aValue, aAdd) {
-    let elem = typeof(aItemOrId) == "string" ? document.getElementById(aItemOrId) : aItemOrId;
+    let elem = typeof (aItemOrId) == "string" ? document.getElementById(aItemOrId) : aItemOrId;
     let att = elem.getAttribute(aAttr);
     let array = att ? att.split(" ") : [];
     let index = array.indexOf(aValue);
@@ -143,7 +143,7 @@ var Tabmix = { // jshint ignore:line
 
     // we use non modal dialog when we call for prompt on startup
     // when we don't have a callBack function use modal dialog
-    let modal = typeof(aCallBack) != "function";
+    let modal = typeof (aCallBack) != "function";
     var i;
     for (i = 0; i < intParam.length; i++)
       dpb.SetInt(i, intParam[i]);
@@ -152,7 +152,7 @@ var Tabmix = { // jshint ignore:line
     for (i = 0; i < strParam.length; i++)
       dpb.SetString(i, strParam[i]);
 
-    if (typeof(aWindow) == "undefined") {
+    if (typeof (aWindow) == "undefined") {
       try { aWindow = window;
       }
       catch (e) { aWindow = null;
@@ -171,7 +171,7 @@ var Tabmix = { // jshint ignore:line
   },
 
   windowEnumerator: function Tabmix_windowEnumerator(aWindowtype) {
-    if (typeof(aWindowtype) == "undefined")
+    if (typeof (aWindowtype) == "undefined")
       aWindowtype = "navigator:browser";
     return Services.wm.getEnumerator(aWindowtype);
   },
diff --git a/modules/AutoReload.jsm b/modules/AutoReload.jsm
index ebb18a8..d858b24 100644
--- a/modules/AutoReload.jsm
+++ b/modules/AutoReload.jsm
@@ -7,6 +7,8 @@ const {interfaces: Ci, utils: Cu} = Components;
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://tabmixplus/Services.jsm");
 
+var _setItem = function() {};
+
 this.AutoReload = {
   init: function() {
     _setItem = TabmixSvc.topWin().Tabmix.setItem;
@@ -88,7 +90,7 @@ this.AutoReload = {
         prefs.clearUserPref(pref);
         return [];
       }
-      let defaultList = ["30","60","120","300","900","1800"];
+      let defaultList = ["30", "60", "120", "300", "900", "1800"];
       list = list.filter(val => defaultList.indexOf(val) == -1);
       let newList = [];
       list.forEach(function(val) {
@@ -102,7 +104,7 @@ this.AutoReload = {
     }
 
     let doc = aPopup.ownerDocument.defaultView.document;
-    getList().sort((a,b) => parseInt(a) > parseInt(b)).forEach(val => {
+    getList().sort((a, b) => parseInt(a) > parseInt(b)).forEach(val => {
       let mi = doc.createElement("menuitem");
       this.setLabel(mi, val);
       mi.setAttribute("type", "radio");
@@ -280,8 +282,6 @@ this.AutoReload = {
   }
 };
 
-function _setItem() {}
-
 function _reloadTab(aTab) {
   if (!aTab || !aTab.parentNode)
     return;
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index fb348c6..d8898ce 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -320,7 +320,7 @@ var ContentClickInternal = {
     }.bind(this);
 
   ///XXX check again how SubmitToTab work
-    if (typeof(this._window.SubmitToTab) != 'undefined') {
+    if (typeof (this._window.SubmitToTab) != 'undefined') {
       let target = event.target;
       if (target instanceof HTMLButtonElement ||
           target instanceof HTMLInputElement) {
@@ -675,7 +675,7 @@ var ContentClickInternal = {
     href = hrefFromOnClick || href;
 
     // prevent link with "custombutton" protocol to open new tab when custombutton extension exist
-    if (event.button != 2 && typeof(custombuttons) != 'undefined') {
+    if (event.button != 2 && typeof (custombuttons) != 'undefined') {
       if (this.checkAttr(href, "custombutton://"))
         return true;
     }
@@ -932,7 +932,7 @@ var ContentClickInternal = {
       return true;
 
     let _list = ["/preferences", "/advanced_search", "/language_tools", "/profiles",
-                 "/accounts/Logout", "/accounts/ServiceLogin","/u/2/stream/all"];
+                 "/accounts/Logout", "/accounts/ServiceLogin", "/u/2/stream/all"];
 
     let testPathname = _list.indexOf(node.pathname) > -1;
     if (testPathname)
@@ -1039,7 +1039,7 @@ var ContentClickInternal = {
   *
   */
   checkAttr: function TMP_checkAttr(attr, string) {
-    if (typeof(attr) == "string")
+    if (typeof (attr) == "string")
       return attr.startsWith(string);
     return false;
   },
@@ -1060,7 +1060,7 @@ var ContentClickInternal = {
   isLinkToExternalDomain: function TMP_isLinkToExternalDomain(curpage, target) {
     var self = this;
     let getDomain = function getDomain(url) {
-      if (typeof(url) != "string")
+      if (typeof (url) != "string")
         url = url.toString();
 
       if (url.match(/auth\?/))
diff --git a/modules/DocShellCapabilities.jsm b/modules/DocShellCapabilities.jsm
index e003b61..795efc1 100644
--- a/modules/DocShellCapabilities.jsm
+++ b/modules/DocShellCapabilities.jsm
@@ -27,7 +27,7 @@ this.DocShellCapabilities = {
       browser.reload();
   },
 
-  caps: ["Images","Subframes","MetaRedirects","Plugins","Javascript"],
+  caps: ["Images", "Subframes", "MetaRedirects", "Plugins", "Javascript"],
 
   collect: function(tab) {
     let browser = tab.linkedBrowser;
diff --git a/modules/Shortcuts.jsm b/modules/Shortcuts.jsm
index b16f3cf..32450db 100644
--- a/modules/Shortcuts.jsm
+++ b/modules/Shortcuts.jsm
@@ -348,7 +348,7 @@ this.Shortcuts = {
       return "";
     let modifiers = key.modifiers.replace(/^[\s,]+|[\s,]+$/g, "")
           .replace("ctrl", "control").split(",");
-    key.modifiers = ["control","meta","accel","alt","shift"].filter(mod => {
+    key.modifiers = ["control", "meta", "accel", "alt", "shift"].filter(mod => {
       return new RegExp(mod).test(modifiers);
     }).join(",");
 
@@ -375,7 +375,7 @@ this.Shortcuts = {
     let disabled = /^d&/.test(value);
     let [keyVal, modifiers] = value.replace(/^d&/, "").split(" ");
     let isKey = keyVal.length == 1;
-    return {modifiers: modifiers || "",key: isKey ? keyVal : "",keycode: isKey ? "" : keyVal, disabled: disabled};
+    return {modifiers: modifiers || "", key: isKey ? keyVal : "", keycode: isKey ? "" : keyVal, disabled: disabled};
   },
 
   // convert key object {modifiers, key, keycode} into a string with " " separator
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index 4c8e443..bd22e22 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -130,7 +130,7 @@ this.SingleWindowModeUtils = {
     else if (args.length >= 3) {
       params.referrerURI = args[2];
       if (TabmixSvc.version(390)) {
-        if (typeof(params.referrerURI) == "string") {
+        if (typeof (params.referrerURI) == "string") {
           try {
             params.referrerURI = existingWindow.makeURI(params.referrerURI);
           } catch (e) {
diff --git a/modules/log.jsm b/modules/log.jsm
index 77a8c8b..ffcd5ca 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -44,7 +44,7 @@ this.console = {
   _timers: {},
   show: function(aMethod, aDelay, aWindow) {
     try {
-      if (typeof(aDelay) == "undefined")
+      if (typeof (aDelay) == "undefined")
         aDelay = 500;
 
       let logMethod = function _logMethod() {
@@ -186,7 +186,7 @@ options = {
   obj: function TMP_console_obj(aObj, aMessage, aDisallowLog, level) {
     var offset = typeof level == "string" ? "  " : "";
     aMessage = aMessage ? offset + aMessage + "\n" : "";
-    var objS = aObj ? offset + aObj.toString() : offset + "aObj is " + typeof(aObj);
+    var objS = aObj ? offset + aObj.toString() : offset + "aObj is " + typeof (aObj);
     objS += ":\n";
 
     for (let prop in aObj) {

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