[Pkg-mozext-commits] [tabmixplus] 03/107: Fix spaces in the code (with jscs)

David Prévot taffit at moszumanska.debian.org
Tue Dec 29 19:02:43 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 42fa8460be7ce347fe49fea03fe4f758cd34942c
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Aug 2 09:57:33 2015 +0300

    Fix spaces in the code (with jscs)
---
 chrome/content/about.js                            |   2 +-
 chrome/content/changecode.js                       |   4 +-
 chrome/content/click/click.js                      |  48 ++--
 chrome/content/content.js                          |  12 +-
 chrome/content/extensions/extensions.js            |  29 ++-
 chrome/content/extensions/sage.js                  |   6 +-
 chrome/content/flst/lasttab.js                     | 110 +++++-----
 chrome/content/links/contentLinks.js               |   6 +-
 chrome/content/links/newTab.js                     |   2 +-
 chrome/content/links/removeBlankTab.js             |   2 +-
 chrome/content/links/setup.js                      |  14 +-
 chrome/content/links/userInterface.js              |  10 +-
 chrome/content/minit/autoReload.js                 |   6 +-
 chrome/content/minit/minit.js                      |  76 +++----
 chrome/content/minit/tabView.js                    |  26 +--
 chrome/content/minit/tablib.js                     | 108 +++++----
 chrome/content/places/places.js                    |  42 ++--
 chrome/content/preferences/appearance.js           |   8 +-
 chrome/content/preferences/events.js               |  14 +-
 chrome/content/preferences/links.js                |   4 +-
 chrome/content/preferences/menu.js                 |  10 +-
 chrome/content/preferences/mouse.js                |  16 +-
 .../preferences/overlay/overlaySanitizeUI.js       |  14 +-
 .../preferences/overlay/preferencesOverlay.js      |  12 +-
 chrome/content/preferences/preferences.js          |  34 +--
 chrome/content/preferences/session.js              |  14 +-
 chrome/content/preferences/shortcuts.js            |   4 +-
 .../preferences/subdialogs/pref-appearance.js      |  10 +-
 .../preferences/subdialogs/pref-filetype.js        |  55 ++---
 chrome/content/session/promptservice.js            |  26 +--
 chrome/content/session/session.js                  | 243 +++++++++++----------
 chrome/content/session/sessionStore.js             |  58 ++---
 chrome/content/tab/tab.js                          |  90 ++++----
 chrome/content/tabmix.js                           |  60 ++---
 chrome/content/utils.js                            |  12 +-
 defaults/preferences/tabmix.js                     |  14 +-
 modules/AsyncUtils.jsm                             |   4 +-
 modules/AutoReload.jsm                             |  38 ++--
 modules/ContentClick.jsm                           |  20 +-
 modules/ContextMenu.jsm                            |   2 +-
 modules/Decode.jsm                                 |   2 +-
 modules/DocShellCapabilities.jsm                   |   2 +-
 modules/DownloadLastDir.jsm                        |   2 +-
 modules/DynamicRules.jsm                           |  60 ++---
 modules/MergeWindows.jsm                           |   8 +-
 modules/Places.jsm                                 |   6 +-
 modules/RenameTab.jsm                              |   2 +-
 modules/Services.jsm                               |  28 +--
 modules/Shortcuts.jsm                              |  14 +-
 modules/SingleWindowModeUtils.jsm                  |  16 +-
 modules/Slideshow.jsm                              |   6 +-
 modules/extensions/CompatibilityCheck.jsm          |  90 ++++----
 modules/extensions/TabGroupsManager.jsm            |   6 +-
 modules/log.jsm                                    |  12 +-
 54 files changed, 755 insertions(+), 764 deletions(-)

diff --git a/chrome/content/about.js b/chrome/content/about.js
index 1196fb8..6eeba74 100644
--- a/chrome/content/about.js
+++ b/chrome/content/about.js
@@ -8,7 +8,7 @@ function init() { // jshint ignore:line
     var currentVersion = addon.version;
     var extensionVersion = document.getElementById("extensionVersion");
     extensionVersion.value = extensionsStrings.getFormattedString("aboutWindowVersionString", [currentVersion]);
-  } catch(ex) {
+  } catch (ex) {
     extensionVersion.hidden = true;
   }
   var acceptButton = document.documentElement.getButton("accept");
diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index e1f616a..5ecad32 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -30,7 +30,7 @@ Tabmix.changeCode = function(aParent, aName, aOptions) {
 
   ChangeCode.prototype = {
     value: "", errMsg: "",
-    _replace: function TMP_utils__replace(substr ,newString, aParams) {
+    _replace: function TMP_utils__replace(substr, newString, aParams) {
       var silent;
       if (typeof aParams != "undefined") {
         let doReplace, flags;
@@ -91,7 +91,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 "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};
diff --git a/chrome/content/click/click.js b/chrome/content/click/click.js
index fb4eb83..6a79eb1 100644
--- a/chrome/content/click/click.js
+++ b/chrome/content/click/click.js
@@ -50,14 +50,14 @@ var TabmixTabClickOptions = {
     // we replace click handler from tab binding with this to make sure that we
     // always call onMouseCommand (if we need to) before we call tab flip.
     // tabcontainer click handler run before tab click handler.
-    if (leftClick && !clickOutTabs &&  !tab.mouseDownSelect)
+    if (leftClick && !clickOutTabs && !tab.mouseDownSelect)
       tab.onMouseCommand(aEvent);
 
     // for tab flip
     if (!clickOutTabs && leftClick && tab.hasAttribute("clickOnCurrent")) {
       tab.removeAttribute("clickOnCurrent");
       let tabFlip = Tabmix.prefs.getBoolPref("tabFlip");
-      if (tabFlip && !aEvent.shiftKey && !aEvent.ctrlKey && !aEvent.altKey && !aEvent.metaKey){
+      if (tabFlip && !aEvent.shiftKey && !aEvent.ctrlKey && !aEvent.altKey && !aEvent.metaKey) {
         let self = this;
         let tabFlipDelay = Tabmix.prefs.getIntPref("tabFlipDelay");
         if (this._tabFlipTimeOut)
@@ -144,7 +144,7 @@ var TabmixTabClickOptions = {
     }
   },
 
-///add option to open new tab after current one
+/// add option to open new tab after current one
 /// convert this switch to object
   doCommand: function TMP_doCommand(command, aTab, clickOutTabs) {
     gBrowser.selectedBrowser.focus();
@@ -186,7 +186,7 @@ var TabmixTabClickOptions = {
       case 11:
         Tabmix.renameTab.editTitle(aTab);
         break;
-      case 12: //taken from tco
+      case 12: // taken from tco
         if (SessionSaver && SessionSaver.snapBackTab)
           SessionSaver.snapBackTab(SessionSaver.snapback_noFX, SessionSaver.snapback_willFocus);
         break;
@@ -229,7 +229,7 @@ var TabmixTabClickOptions = {
             gIeTabObj.switchTabEngine(aTab, gIeTabObj.getBoolPref(ieTab.folder + ".alwaysNewTab", false));
           }
         }
-        else if(window.ieview && window.ieview.launch) {
+        else if (window.ieview && window.ieview.launch) {
           href = gBrowser.getBrowserForTab(aTab).currentURI.spec;
           ieview.launch(href);
         }
@@ -542,15 +542,15 @@ var TabmixContext = {
     Tabmix.setItem("tm-docShell", "disabled", clickOutTabs);
 
     var freezeTabMenu = document.getElementById("tm-freezeTab");
-    if ( !freezeTabMenu.hidden )
+    if (!freezeTabMenu.hidden)
       Tabmix.setItem(freezeTabMenu, "checked", lockedTab && protectedTab);
 
     var lockTabMenu = document.getElementById("tm-lockTab");
-    if ( !lockTabMenu.hidden )
+    if (!lockTabMenu.hidden)
       Tabmix.setItem(lockTabMenu, "checked", lockedTab);
 
     var protectTabMenu = document.getElementById("tm-protectTab");
-    if ( !protectTabMenu.hidden )
+    if (!protectTabMenu.hidden)
       Tabmix.setItem(protectTabMenu, "checked", protectedTab);
 
     return true;
@@ -567,7 +567,7 @@ var TabmixContext = {
       return;
     // don't show 2 menuseparator together
     var hideNextSeparator = true, lastVisible, hideMenu = true;
-    for(var mi = tabContextMenu.firstChild; mi; mi = mi.nextSibling) {
+    for (var mi = tabContextMenu.firstChild; mi; mi = mi.nextSibling) {
       if (mi.localName == "menuseparator") {
         if (!lastVisible || !hideNextSeparator) {
           mi.hidden = hideNextSeparator;
@@ -577,7 +577,7 @@ var TabmixContext = {
           }
         }
         else if (hideNextSeparator) {
-          if (lastVisible.getAttribute("type")=="tabmix" && mi.getAttribute("type")!="tabmix") {
+          if (lastVisible.getAttribute("type") == "tabmix" && mi.getAttribute("type") != "tabmix") {
             mi.hidden = false;
             lastVisible.hidden = true;
             lastVisible = mi;
@@ -586,7 +586,7 @@ var TabmixContext = {
             mi.hidden = true;
         }
       }
-      else if(!mi.hidden && !mi.collapsed) {
+      else if (!mi.hidden && !mi.collapsed) {
         hideNextSeparator = false;
         hideMenu = false;
       }
@@ -623,11 +623,11 @@ var TabmixContext = {
       Tabmix.showItem("context-openlinkincurrent", Tabmix.prefs.getBoolPref("openLinkHere") && onLink);
       var inverseLink = document.getElementById("tm-openinverselink");
       Tabmix.showItem(inverseLink, Tabmix.prefs.getBoolPref("openInverseLink") && onLink);
-      if (!inverseLink.hidden){
+      if (!inverseLink.hidden) {
         let bgPref = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
-        let focusType = bgPref ? "fg":"bg";
-        inverseLink.setAttribute("label", inverseLink.getAttribute(focusType+"label"));
-        inverseLink.setAttribute("accesskey", inverseLink.getAttribute(focusType+"accesskey"));
+        let focusType = bgPref ? "fg" : "bg";
+        inverseLink.setAttribute("label", inverseLink.getAttribute(focusType + "label"));
+        inverseLink.setAttribute("accesskey", inverseLink.getAttribute(focusType + "accesskey"));
       }
       Tabmix.showItem("tm-linkWithhistory", Tabmix.prefs.getBoolPref("linkWithHistory") && onLink);
       var closeTabMenu = document.getElementById("tm-content-closetab");
@@ -707,10 +707,10 @@ var TabmixContext = {
       var textSep = document.getElementById("tm-content-textSep");
       undoCloseSep.hidden = undoCloseTabMenu.hidden && undoCloseListMenu.hidden ||
           gContextMenu.isTextSelected && closeTabMenu.hidden && lockTabMenu.hidden &&
-          protectTabMenu.hidden && tabsListMenu.hidden  && freezeTabMenu.hidden;
+          protectTabMenu.hidden && tabsListMenu.hidden && freezeTabMenu.hidden;
       miscSep.hidden = mergeMenu.hidden && closeTabMenu.hidden && duplicateTabMenu.hidden &&
           duplicateWinMenu.hidden && lockTabMenu.hidden && protectTabMenu.hidden &&
-          tabsListMenu.hidden  && freezeTabMenu.hidden || gContextMenu.isTextSelected;
+          tabsListMenu.hidden && freezeTabMenu.hidden || gContextMenu.isTextSelected;
       textSep.hidden = !gContextMenu.isTextSelected || mergeMenu.hidden &&
           duplicateTabMenu.hidden && duplicateWinMenu.hidden && closeTabMenu.hidden &&
           lockTabMenu.hidden && protectTabMenu.hidden && tabsListMenu.hidden &&
@@ -740,7 +740,7 @@ var TabmixContext = {
         let handler = TabmixSvc.syncHandlers.get(browser.permanentKey);
         let result = handler.getSelectedLinks();
         gContextMenu.tabmixLinks = result && result.split('\n');
-      } catch(ex) {
+      } catch (ex) {
         Tabmix.log("unable to get syncHandlers for page " +
                    browser.currentURI.spec + "\n" + ex);
       }
@@ -841,13 +841,13 @@ var TabmixAllTabs = {
     if (event.target.disabled)
       return;
 
-    var tablist =  document.getElementById("tabslist");
+    var tablist = document.getElementById("tabslist");
 
     this.beforeCommonList(tablist);
     this.createCommonList(tablist, 2, side);
 
     if (tablist.hasChildNodes())
-      tablist.showPopup(event.target, -1, -1, "popup", "bottomleft","topleft");
+      tablist.showPopup(event.target, -1, -1, "popup", "bottomleft", "topleft");
   },
 
   removeTabFromList: function TMP_removeTabFromList(event, popup, aType) {
@@ -879,7 +879,7 @@ var TabmixAllTabs = {
   // show sort/unsort tabs list popup after click on sorted tab menu
   showTabsListPopup: function TMP_showTabsListPopup(event) {
     event.stopPropagation();
-    setTimeout( function (popup){
+    setTimeout(function(popup) {
       popup.showPopup(popup.parentNode, -1, -1, "popup", "bottomleft", "topleft");
     }, 0, event.target.parentNode);
   },
@@ -937,7 +937,7 @@ var TabmixAllTabs = {
     var tabs;
     var i;
 
-    switch(aType) {
+    switch (aType) {
       case 1:
         let TabSorting = function _tabSorting(tab, index) {
           this.Tab = tab;
@@ -991,7 +991,7 @@ var TabmixAllTabs = {
     popup.removeEventListener("popupshown", this, false);
     let scrollBox = document.getAnonymousElementByAttribute(popup, "class", "popup-internal-box");
     let items = Array.slice(popup.childNodes);
-    let element = items.indexOf(this._selectedItem) < popup.childElementCount/2 ? popup.firstChild : popup.lastChild;
+    let element = items.indexOf(this._selectedItem) < popup.childElementCount / 2 ? popup.firstChild : popup.lastChild;
     scrollBox.ensureElementIsVisible(element);
     scrollBox.ensureElementIsVisible(this._selectedItem);
   },
@@ -1004,7 +1004,7 @@ var TabmixAllTabs = {
     mi.setAttribute("tooltiptext", tab.label + "\n" + url);
     let count = "";
     if (Tabmix.ltr) {
-      count = (value<9 ? "  " : "") + (value + 1) + ": ";
+      count = (value < 9 ? "  " : "") + (value + 1) + ": ";
       mi.setAttribute("count", count);
     }
     this._setMenuitemAttributes(mi, tab);
diff --git a/chrome/content/content.js b/chrome/content/content.js
index d69e387..9804965 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -41,7 +41,7 @@ let TabmixContentHandler = {
     "Tabmix:collectOpener",
   ],
 
-  init: function () {
+  init: function() {
     this.MESSAGES.forEach(m => addMessageListener(m, this));
 
     // Send a CPOW to the parent so that it can synchronously request
@@ -49,7 +49,7 @@ let TabmixContentHandler = {
     sendSyncMessage("Tabmix:SetSyncHandler", {}, {syncHandler: this});
   },
 
-  receiveMessage: function ({name, data}) {
+  receiveMessage: function({name, data}) {
     // The docShell might be gone. Don't process messages,
     // that will just lead to errors anyway.
     if (!docShell) {
@@ -76,7 +76,7 @@ let TabmixContentHandler = {
         // workaround for bug 1081891
         let title = content.document.title;
         if (title)
-          sendAsyncMessage("DOMTitleChanged", { title: title });
+          sendAsyncMessage("DOMTitleChanged", {title: title});
         break;
       case "Tabmix:updateHistoryTitle":
         let history = docShell.QueryInterface(Ci.nsIWebNavigation).sessionHistory;
@@ -85,7 +85,7 @@ let TabmixContentHandler = {
       case "Tabmix:collectScrollPosition":
         let scroll = {scrollX: content.scrollX,
                       scrollY: content.scrollY};
-        sendAsyncMessage("Tabmix:updateScrollPosition", { scroll: scroll });
+        sendAsyncMessage("Tabmix:updateScrollPosition", {scroll: scroll});
         break;
       case "Tabmix:setScrollPosition":
         let {x, y} = data;
@@ -167,10 +167,10 @@ var TabmixClickEventHandler = {
 
     let [href, node] = this._hrefAndLinkNodeForClickEvent(event);
 
-    let json = { button: event.button, shiftKey: event.shiftKey,
+    let json = {button: event.button, shiftKey: event.shiftKey,
                  ctrlKey: event.ctrlKey, metaKey: event.metaKey,
                  altKey: event.altKey, href: null, title: null,
-                 bookmark: false };
+                 bookmark: false};
 
     if (TabmixSvc.version(380))
       json.referrerPolicy = ownerDoc.referrerPolicy;
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index 84794b8..46a2deb 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -4,7 +4,6 @@
  * original code by onemen
  */
 
-
 /**
  *
  * Fix compatibility with other extensions
@@ -44,7 +43,7 @@ var TMP_extensionsCompatibility = {
       if ("TabGroupsManagerApiVer1" in window) {
         Tabmix.extensions.tabGroupManager = true;
         window.TMP_TabGroupsManager = {};
-        window.TMP_TabGroupsManager.tabmixSessionsManager = function () {};
+        window.TMP_TabGroupsManager.tabmixSessionsManager = function() {};
         let tmp = {};
         Components.utils.import("resource://tabmixplus/extensions/TabGroupsManager.jsm", tmp);
         tmp.TMP_TabGroupsManager.changeCode = Tabmix.changeCode;
@@ -97,16 +96,16 @@ var TMP_extensionsCompatibility = {
     // we replace it back here
     if (typeof bgSaverInit == "function" && typeof getBoolPref == "function" &&
             getBoolPref.toString().indexOf("bgSaverPref.prefHasUserValue(sName)") != -1) {
-      window.getBoolPref = function getBoolPref ( prefname, def ) {
+      window.getBoolPref = function getBoolPref(prefname, def) {
         try {
           return Services.prefs.getBoolPref(prefname);
         }
-        catch(ex) {
+        catch (ex) {
           try {
             return (bgSaverPref.prefHasUserValue(prefname) &&
                     bgSaverPref.getBoolPref(prefname));
           }
-          catch(e) {}
+          catch (e) {}
         }
         return def;
       };
@@ -140,11 +139,9 @@ var TMP_extensionsCompatibility = {
     }
     */
 
-
     // https://addons.mozilla.org/en-US/firefox/addon/bug489729-disable-detach-and-t//
     // we don't need to do any changes to bug489729 extension version 1.6+
 
-
     // https://addons.mozilla.org/en-US/firefox/addon/foxtab/
     if ("foxTab" in window) {
       let loadNewInBackground = '$& var loadNewInBackground = Tabmix.prefs.getBoolPref("loadNewInBackground");';
@@ -458,7 +455,7 @@ var TMP_extensionsCompatibility = {
 };
 
 TMP_extensionsCompatibility.RSSTICKER = {
-   init : function ()  {
+   init: function() {
      Tabmix.changeCode(RSSTICKER, "RSSTICKER.writeFeed")._replace(
        'tbb.setAttribute("onclick"',
        'tbb.setAttribute("onclick", "this.onClick(event);");\
@@ -471,7 +468,7 @@ TMP_extensionsCompatibility.RSSTICKER = {
      ).toCode();
    },
 
-   onClick : function (event) {
+   onClick: function(event) {
      if (event.ctrlKey) {
        this.markAsRead(true);
      }
@@ -483,7 +480,7 @@ TMP_extensionsCompatibility.RSSTICKER = {
      }
    },
 
-   onContextOpen : function (target) {
+   onContextOpen: function(target) {
      if (!target) {
        if (Tabmix.whereToOpen(null).lock)
          this.parent.browser.openInNewTab(this.href);
@@ -507,7 +504,7 @@ TMP_extensionsCompatibility.RSSTICKER = {
 // prevent Wizz RSS from load pages in locked tabs
 TMP_extensionsCompatibility.wizzrss = {
   started: null,
-  init : function ()  {
+  init: function() {
     if (this.started)
       return;
     this.started = true;
@@ -523,7 +520,7 @@ TMP_extensionsCompatibility.wizzrss = {
     });
   },
 
-  openURI : function (uri)  {
+  openURI: function(uri) {
     var w = Tabmix.getTopWin();
     var tabBrowser = w.gBrowser;
 
@@ -539,7 +536,7 @@ TMP_extensionsCompatibility.wizzrss = {
 
 // prevent Newsfox from load pages in locked tabs
 TMP_extensionsCompatibility.newsfox = {
-   init : function ()  {
+   init: function() {
       Tabmix.changeCode(window, "openNewsfox")._replace(
          /if \(newTab\) {/,
          'newTab = newTab || Tabmix.whereToOpen(null).lock; \
@@ -557,7 +554,7 @@ TMP_extensionsCompatibility.newsfox = {
 TMP_extensionsCompatibility.treeStyleTab = {
   errorMsg: "Error in Tabmix when trying to load compatible functions with TreeStyleTab extension",
 
-  preInit: function () {
+  preInit: function() {
     if (typeof TreeStyleTabWindowHelper.overrideExtensionsPreInit == "function") {
       // overrideExtensionsPreInit look for 'gBrowser.restoreTab' in tablib.init
       tablib._init = tablib.init;
@@ -571,7 +568,7 @@ TMP_extensionsCompatibility.treeStyleTab = {
     }
   },
 
-  onContentLoaded: function () {
+  onContentLoaded: function() {
     // workaround, with version 0.15.2015061300a003855
     // gBrowser.treeStyleTab.initTabContentsOrder throw on Firefox 41+
     Tabmix.TST_initTabContentsOrder = function() {
@@ -677,7 +674,7 @@ TMP_extensionsCompatibility.treeStyleTab = {
     }
   },
 
-  onWindowLoaded: function () {
+  onWindowLoaded: function() {
     /**
      *  TST have eval to TMP_Bookmark.openGroup
      *  we replace TMP_Bookmark.openGroup with TMP_Places.openGroup at Tabmix 0.3.8.2pre.090830
diff --git a/chrome/content/extensions/sage.js b/chrome/content/extensions/sage.js
index b9f1a7d..2d7a48d 100644
--- a/chrome/content/extensions/sage.js
+++ b/chrome/content/extensions/sage.js
@@ -5,8 +5,8 @@
 
 // last updated for sage version 1.5.2 - 2013-08-12
 var TMP_Sage = {
-   OPEN_TAB_FOR_SAGE:"extensions.tabmix.opentabfor.sage",
-   init: function () {
+   OPEN_TAB_FOR_SAGE: "extensions.tabmix.opentabfor.sage",
+   init: function() {
       TMP_Places.contextMenu.toggleEventListener(true);
 
       Tabmix.changeCode(window, "updateItemContextMenu")._replace(
@@ -48,7 +48,7 @@ var TMP_Sage = {
 
    },
 
-   buildContextMenu: function () {
+   buildContextMenu: function() {
       var _open = document.getElementById("rssOpenItem");
       var _openInWindow = document.getElementById("rssOpenNewWindowItem");
       var _openInTab = document.getElementById("rssOpenNewTabItem");
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index 78236fa..f3b648c 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -6,20 +6,20 @@
 // The Initial Developer of the Original Code is Timothy Humphrey.  //
 /*////////////////////////////////////////////////////////////////////
 var TMP_LastTab = {
-   CtrlKey : false,
-   handleCtrlTab : true,
-   KeyboardNavigating : true,
-   KeyLock : false,
-   respondToMouseInTabList : true,
-   showTabList : true,
-   SuppressTabListReset : false,
-   TabHistory : [],
-   TabIndex : 0,
-   TabList : null,
-   TabListLock : false,
+   CtrlKey: false,
+   handleCtrlTab: true,
+   KeyboardNavigating: true,
+   KeyLock: false,
+   respondToMouseInTabList: true,
+   showTabList: true,
+   SuppressTabListReset: false,
+   TabHistory: [],
+   TabIndex: 0,
+   TabList: null,
+   TabListLock: false,
    _inited: false,
 
-   DisplayTabList : function() {
+   DisplayTabList: function() {
       var element = document.documentElement;
       var tablist = this.TabList;
 
@@ -48,7 +48,7 @@ var TMP_LastTab = {
       this.TabListLock = true;
    },
 
-   init : function() {
+   init: function() {
       this._inited = true;
 
       this.TabList = document.getElementById("lasttabTabList");
@@ -78,7 +78,7 @@ var TMP_LastTab = {
       this.ReadPreferences();
    },
 
-   deinit : function() {
+   deinit: function() {
       if (!this._inited)
         return;
 
@@ -91,7 +91,7 @@ var TMP_LastTab = {
          els.removeSystemEventListener(tabBox._eventNode, "keypress", this, false);
    },
 
-   handleEvent : function(event) {
+   handleEvent: function(event) {
       switch (event.type) {
          case "keydown":
             this.OnKeyDown(event);
@@ -111,25 +111,25 @@ var TMP_LastTab = {
       }
    },
 
-   ItemActive : function(event) {
+   ItemActive: function(event) {
       TabmixAllTabs.updateMenuItemActive(event);
-      if(this.respondToMouseInTabList) {
-         if(this.KeyboardNavigating) {
-            if(event.target.value != this.inverseIndex(this.TabIndex))
+      if (this.respondToMouseInTabList) {
+         if (this.KeyboardNavigating) {
+            if (event.target.value != this.inverseIndex(this.TabIndex))
                this.tabs[this.TabIndex].mCorrespondingMenuitem.setAttribute("_moz-menuactive", "false");
             this.KeyboardNavigating = false;
          }
          this.TabIndex = this.inverseIndex(event.target.value);
       }
       else {
-         if(event.target.value != this.inverseIndex(this.TabIndex))
+         if (event.target.value != this.inverseIndex(this.TabIndex))
             event.target.setAttribute("_moz-menuactive", "false");
       }
    },
 
-   ItemInactive : function(event) {
+   ItemInactive: function(event) {
       TabmixAllTabs.updateMenuItemInactive(event);
-      if(!this.respondToMouseInTabList && event.target.value == this.inverseIndex(this.TabIndex))
+      if (!this.respondToMouseInTabList && event.target.value == this.inverseIndex(this.TabIndex))
          event.target.setAttribute("_moz-menuactive", "true");
    },
 
@@ -150,13 +150,13 @@ var TMP_LastTab = {
        this.TabHistory.splice(i, 1);
    },
 
-   isCtrlTab : function(event) {
+   isCtrlTab: function(event) {
      return (this.handleCtrlTab || this.showTabList) &&
              event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_TAB &&
              event.ctrlKey && !event.altKey && !event.metaKey;
    },
 
-   OnKeyDown : function(event) {
+   OnKeyDown: function(event) {
       this.CtrlKey = event.ctrlKey && !event.altKey && !event.metaKey;
       Tabmix.keyModifierDown = event.shiftKey || event.ctrlKey || event.altKey || event.metaKey;
       if (Tabmix.isVersion(320))
@@ -180,10 +180,10 @@ var TMP_LastTab = {
      return this._tabs;
    },
 
-   OnKeyPress : function _LastTab_OnKeyPress(event) {
+   OnKeyPress: function _LastTab_OnKeyPress(event) {
       if (this.isCtrlTab(event)) {
          let tabCount = this.tabs.length;
-         if(!this.KeyLock) {
+         if (!this.KeyLock) {
             if (this.handleCtrlTab) {
                this.TabIndex = tabCount - 1;
             } else {
@@ -192,29 +192,29 @@ var TMP_LastTab = {
             this.KeyLock = true;
          }
 
-         if(this.TabListLock) {
+         if (this.TabListLock) {
             let tab = this.tabs[this.TabIndex];
             if (tab)
               tab.mCorrespondingMenuitem.setAttribute("_moz-menuactive", "false");
          }
 
-         if((this.handleCtrlTab && event.shiftKey) || (!this.handleCtrlTab && !event.shiftKey)) {
+         if ((this.handleCtrlTab && event.shiftKey) || (!this.handleCtrlTab && !event.shiftKey)) {
             this.TabIndex++;
-            if(this.TabIndex >= tabCount)
+            if (this.TabIndex >= tabCount)
                this.TabIndex = 0;
          }
          else {
             this.TabIndex--;
-            if(this.TabIndex < 0)
+            if (this.TabIndex < 0)
                this.TabIndex = tabCount - 1;
          }
 
-         if(this.showTabList) {
+         if (this.showTabList) {
             this.KeyboardNavigating = true;
-            if(!this.TabListLock) {
-               if(tabCount > 1) {
+            if (!this.TabListLock) {
+               if (tabCount > 1) {
                  if (!this._timer) {
-                   this._timer = setTimeout(function (self) {
+                   this._timer = setTimeout(function(self) {
                      self._timer = null;
                      if (!self.TabListLock)
                        self.DisplayTabList();
@@ -241,30 +241,30 @@ var TMP_LastTab = {
         return;
       }
       else {
-         if(this.TabListLock)
+         if (this.TabListLock)
             this.TabList.hidePopup();
 
          gBrowser.mTabBox.handleEvent(event);
       }
    },
 
-   OnKeyUp : function _LastTab_OnKeyUp(event) {
+   OnKeyUp: function _LastTab_OnKeyUp(event) {
       var keyReleased = event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_CONTROL;
       this.CtrlKey = event.ctrlKey && !event.altKey && !event.metaKey;
       Tabmix.keyModifierDown = event.shiftKey || event.ctrlKey || event.altKey || event.metaKey;
-      if(!keyReleased)
+      if (!keyReleased)
         return;
       var tabToSelect;
-      if(this._timer) {
+      if (this._timer) {
         clearTimeout(this._timer);
         this._timer = null;
         tabToSelect = this.tabs[this.TabIndex];
         TabmixAllTabs._tabSelectedFromList(tabToSelect);
         this.PushSelectedTab();
       }
-      if(this.TabListLock) {
+      if (this.TabListLock) {
          let tab = this.tabs[this.TabIndex];
-         if(tab && tab.mCorrespondingMenuitem.getAttribute("_moz-menuactive") == "true") {
+         if (tab && tab.mCorrespondingMenuitem.getAttribute("_moz-menuactive") == "true") {
             tabToSelect = tab;
          }
 
@@ -276,7 +276,7 @@ var TMP_LastTab = {
            TabmixAllTabs._tabSelectedFromList(tabToSelect);
          this.PushSelectedTab();
       }
-      if(this.KeyLock) {
+      if (this.KeyLock) {
          this.PushSelectedTab();
          this.TabIndex = 0;
          this.KeyLock = false;
@@ -284,25 +284,25 @@ var TMP_LastTab = {
       this._tabs = null;
    },
 
-   onMenuCommand : function(event) {
-      if(this.respondToMouseInTabList) {
+   onMenuCommand: function(event) {
+      if (this.respondToMouseInTabList) {
          TabmixAllTabs._tabSelectedFromList(event.target.tab);
          this.PushSelectedTab();
       }
    },
 
-   onPopupshowing : function() {
+   onPopupshowing: function() {
       this.TabList.addEventListener("DOMMenuItemActive", this, true);
       this.TabList.addEventListener("DOMMenuItemInactive", this, true);
    },
 
-   onPopuphidden : function() {
+   onPopuphidden: function() {
       this.TabList.removeEventListener("DOMMenuItemActive", this, true);
       this.TabList.removeEventListener("DOMMenuItemInactive", this, true);
-      if(!this.SuppressTabListReset) {
+      if (!this.SuppressTabListReset) {
          var tablist = this.TabList;
 
-         while(tablist.childNodes.length > 0)
+         while (tablist.childNodes.length > 0)
             tablist.removeChild(tablist.childNodes[0]);
 
          this.TabListLock = false;
@@ -319,18 +319,18 @@ var TMP_LastTab = {
          return;
 
       var tabCount = this.TabHistory.length;
-      if(tabCount != gBrowser.tabs.length) {
-         if(tabCount > gBrowser.tabs.length) {
-            if(gBrowser.tabs.length == 1) {
+      if (tabCount != gBrowser.tabs.length) {
+         if (tabCount > gBrowser.tabs.length) {
+            if (gBrowser.tabs.length == 1) {
                this.KeyLock = false;
                this.TabIndex = 0;
             }
          }
          this.PushSelectedTab();
       }
-      else if(!this.KeyLock) {
-         if(this.CtrlKey)
-            this.KeyLock = true; //allow other tab navigation methods to work
+      else if (!this.KeyLock) {
+         if (this.CtrlKey)
+            this.KeyLock = true; // allow other tab navigation methods to work
          else
             this.PushSelectedTab();
       }
@@ -342,7 +342,7 @@ var TMP_LastTab = {
       this.TabHistory.push(selectedTab);
    },
 
-   ReadPreferences : function() {
+   ReadPreferences: function() {
       // when Build-in tabPreviews is on we disable our own function
       var mostRecentlyUsed = Services.prefs.getBoolPref("browser.ctrlTab.previews");
       var tabPreviews = document.getElementById("ctrlTab-panel") && "ctrlTab" in window;
@@ -367,7 +367,7 @@ var TMP_LastTab = {
       this.respondToMouseInTabList = Tabmix.prefs.getBoolPref("lasttab.respondToMouseInTabList");
    },
 
-   inverseIndex : function(index) {
+   inverseIndex: function(index) {
       return this.handleCtrlTab ? index : this.tabs.length - 1 - index;
    }
 
diff --git a/chrome/content/links/contentLinks.js b/chrome/content/links/contentLinks.js
index 09ee9bc..aac0364 100644
--- a/chrome/content/links/contentLinks.js
+++ b/chrome/content/links/contentLinks.js
@@ -5,7 +5,7 @@ Tabmix.contentAreaClick = {
     // this getter trigger by call to isGreasemonkeyInstalled from
     // TMP_extensionsCompatibility.onDelayedStartup
     XPCOMUtils.defineLazyGetter(Tabmix, "ContentClick", function() {
-      let tmp = { };
+      let tmp = {};
       Cu.import("resource://tabmixplus/ContentClick.jsm", tmp);
       return tmp.TabmixContentClick;
     });
@@ -51,8 +51,8 @@ Tabmix.contentAreaClick = {
      * Tabmix.contentAreaClick.contentLinkClick
      */
     Tabmix.changeCode(window, "handleLinkClick")._replace(
-      '{', '{\n'+
-      '  if (arguments.length > 3)\n'+
+      '{', '{\n' +
+      '  if (arguments.length > 3)\n' +
       '    event.__where = arguments[3] && arguments[3].where;'
     )._replace(
       'whereToOpenLink(event);',
diff --git a/chrome/content/links/newTab.js b/chrome/content/links/newTab.js
index f1c148a..3f7e9bd 100644
--- a/chrome/content/links/newTab.js
+++ b/chrome/content/links/newTab.js
@@ -7,7 +7,7 @@
     let win = Tabmix.getTopWin();
     if (win)
       win.TMP_Places._titlefrombookmark = Tabmix.prefs.getBoolPref("titlefrombookmark");
-    gGrid.cells.forEach(function (cell) {
+    gGrid.cells.forEach(function(cell) {
       let site = cell.site;
       if (!site)
         return;
diff --git a/chrome/content/links/removeBlankTab.js b/chrome/content/links/removeBlankTab.js
index 96673af..e8656b7 100644
--- a/chrome/content/links/removeBlankTab.js
+++ b/chrome/content/links/removeBlankTab.js
@@ -60,7 +60,7 @@ let TabmixRemoveBlankTab = {
       let doc;
       try {
         doc = nav.document;
-      } catch(ex) {
+      } catch (ex) {
         return result;
       }
       result.win = nav.QueryInterface(Ci.nsIDocShellTreeItem)
diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index 98ed431..0845756 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -122,7 +122,7 @@ Tabmix.beforeBrowserInitOnLoad = function() {
                       this.prefs.getIntPref("sessions.onStart") <= 1 ||
                       this.prefs.getBoolPref("sessions.crashRecovery") &&
                       this.prefs.prefHasUserValue("sessions.crashed"));
-    var notRestore =  firstWindow && !disabled && sessionManager &&
+    var notRestore = firstWindow && !disabled && sessionManager &&
                       this.prefs.getIntPref("sessions.onStart") > 1 &&
                       (!this.prefs.getBoolPref("sessions.onStart.restorePinned") ||
                         this.prefs.getBoolPref("sessions.restore.concatenate"));
@@ -222,7 +222,7 @@ Tabmix.beforeBrowserInitOnLoad = function() {
     // look for installed extensions that are incompatible with tabmix
     if (this.firstWindowInSession && this.prefs.getBoolPref("disableIncompatible")) {
       setTimeout(function checkCompatibility(aWindow) {
-        let tmp = { };
+        let tmp = {};
         Components.utils.import("resource://tabmixplus/extensions/CompatibilityCheck.jsm", tmp);
         tmp = new tmp.CompatibilityCheck(aWindow, true);
       }, 0, window);
@@ -264,14 +264,16 @@ Tabmix.beforeStartup = function TMP_beforeStartup(tabBrowser, aTabContainer) {
     };
 
     tabBrowser.isBlankBrowser = function TMP_isBlankBrowser(aBrowser, aboutBlank) {
-       try{
+       try {
           if (!aBrowser || !aBrowser.currentURI)
              return true;
           if (aBrowser.canGoForward || aBrowser.canGoBack)
              return false;
           return aboutBlank ? aBrowser.currentURI.spec == TabmixSvc.aboutBlank :
                  Tabmix.isNewTabUrls(aBrowser.currentURI.spec);
-       } catch (ex) {Tabmix.assert(ex); return true;}
+       } catch (ex) {
+Tabmix.assert(ex); return true;
+}
     };
 
     /**
@@ -281,7 +283,7 @@ Tabmix.beforeStartup = function TMP_beforeStartup(tabBrowser, aTabContainer) {
      */
     if (typeof tabBrowser.getTabForBrowser != "function") {
        // this is _getTabForBrowser version from Firefox 23
-       tabBrowser.getTabForBrowser = function (aBrowser) {
+       tabBrowser.getTabForBrowser = function(aBrowser) {
           for (let i = 0; i < this.tabs.length; i++) {
             if (this.tabs[i].linkedBrowser == aBrowser)
               return this.tabs[i];
@@ -290,7 +292,7 @@ Tabmix.beforeStartup = function TMP_beforeStartup(tabBrowser, aTabContainer) {
        };
     }
 
-    tabBrowser.getTabForLastPanel = function () {
+    tabBrowser.getTabForLastPanel = function() {
       let notificationbox = this.mPanelContainer.lastChild;
       let attrName = Tabmix.isVersion(180) ? "class" : "anonid"; // changed by Bug 768442
       let browser = document.getAnonymousElementByAttribute(notificationbox, attrName, "browserStack").firstChild;
diff --git a/chrome/content/links/userInterface.js b/chrome/content/links/userInterface.js
index a9abb7c..a9c93ad 100644
--- a/chrome/content/links/userInterface.js
+++ b/chrome/content/links/userInterface.js
@@ -109,7 +109,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
       case 0 : // blank tab, by default
          url = "about:blank";
          break;
-      case 1 :  // home page
+      case 1 : // home page
          url = gHomeButton.getHomePage().split("|")[0];
          break;
       case 2 : // current URI
@@ -128,7 +128,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
             url = Services.prefs.getComplexValue(prefName, Ci.nsISupportsString).data;
             if (newTabUrl == "about:privatebrowsing" && url == TabmixSvc.aboutNewtab)
               url = "about:privatebrowsing";
-         } catch (ex) {  Tabmix.assert(ex); }
+         } catch (ex) { Tabmix.assert(ex); }
          // use this if we can't find the pref
          if (!url)
             url = newTabUrl;
@@ -162,7 +162,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
             dontMove: true});
    if (replaceLastTab) {
      newTab.__newLastTab = url;
-     if (Services.prefs.getCharPref("general.skins.selectedSkin") == "Vista-aero" ) {
+     if (Services.prefs.getCharPref("general.skins.selectedSkin") == "Vista-aero") {
        gBrowser.selectedTab = newTab;
        gBrowser.updateCurrentBrowser();
      }
@@ -215,7 +215,7 @@ Tabmix.clearUrlBar = function TMP_clearUrlBar(aTab, aUrl, aTimeOut, replaceLastT
     if (this.isVersion(340) && gMultiProcessBrowser)
       aTab._skipContentFocus = true;
     if (aTimeOut)
-      setTimeout(function () {focusAndSelectUrlBar();}, 30);
+      setTimeout(function() {focusAndSelectUrlBar();}, 30);
     else
       focusAndSelectUrlBar();
   }
@@ -304,7 +304,7 @@ Tabmix.openUILink_init = function TMP_openUILink_init() {
       '      where = win.Tabmix.checkCurrent(url);' +
       '  }' +
       '  try {$&}  catch (ex) {  }'
-    )._replace( // fix incompatibility with Omnibar (O is not defined)
+    )._replace(// fix incompatibility with Omnibar (O is not defined)
       'O.handleSearchQuery',
       'window.Omnibar.handleSearchQuery', {silent: true}
     ).toCode();
diff --git a/chrome/content/minit/autoReload.js b/chrome/content/minit/autoReload.js
index 3f868e7..6d80c21 100644
--- a/chrome/content/minit/autoReload.js
+++ b/chrome/content/minit/autoReload.js
@@ -2,7 +2,7 @@
 
 var gPref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
 
-function load(){
+function load() {
   var customReloadTime = gPref.getIntPref("extensions.tabmix.reload_time");
   document.getElementById("autoreload_minutes").value = Math.floor(customReloadTime / 60);
   document.getElementById("autoreload_seconds").value = customReloadTime % 60;
@@ -17,7 +17,7 @@ function accept() {
   let defaultList = [60,120,300,900,1800];
   if (list.concat(defaultList).indexOf(customReloadTime) == -1) {
     list.push(customReloadTime);
-    if (list.length > 6 )
+    if (list.length > 6)
       list.shift();
     gPref.setCharPref("extensions.tabmix.custom_reload_list", list.join(","));
   }
@@ -37,7 +37,7 @@ function getCustomReloadTime() {
     seconds = parseInt(document.getElementById("autoreload_seconds").value);
   else
     seconds = 0;
-  return minutes*60 + seconds;
+  return minutes * 60 + seconds;
 }
 
 function disable_OK() {
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index d2baaa6..ee04919 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -12,8 +12,8 @@ var TMP_tabDNDObserver = {
   LinuxMarginEnd: 0,
   _dragTime: 0,
   _dragOverDelay: 350,
-  DRAG_LINK              : 0,
-  DRAG_TAB_TO_NEW_WINDOW : 1,
+  DRAG_LINK: 0,
+  DRAG_TAB_TO_NEW_WINDOW: 1,
   DRAG_TAB_IN_SAME_WINDOW: 2,
   TAB_DROP_TYPE: "application/x-moz-tabbrowser-tab",
   draggedTab: null,
@@ -24,7 +24,7 @@ var TMP_tabDNDObserver = {
     var tabBar = gBrowser.tabContainer;
     if (Tabmix.extensions.verticalTabBar) {
       tabBar.useTabmixDragstart = () => false;
-      tabBar.useTabmixDnD  = () => false;
+      tabBar.useTabmixDnD = () => false;
       return;
     }
 
@@ -109,7 +109,7 @@ var TMP_tabDNDObserver = {
     return Tabmix.isVersion(280) && gBrowser.tabContainer._isCustomizing;
   },
 
-  onDragStart: function (event) {
+  onDragStart: function(event) {
     // we get here on capturing phase before "tabbrowser-close-tab-button"
     // binding stop the event propagation
     if (event.originalTarget.getAttribute("anonid") == "tmp-close-button") {
@@ -207,7 +207,7 @@ var TMP_tabDNDObserver = {
       let disAllowDrop, targetTab = gBrowser.tabs[newIndex];
       if (targetTab.getAttribute("locked") && !gBrowser.isBlankNotBusyTab(targetTab)) {
         try {
-          var url = browserDragAndDrop.drop(event, { });
+          var url = browserDragAndDrop.drop(event, {});
           if (!url || !url.length || url.indexOf(" ", 0) != -1 ||
               /^\s*(javascript|data):/.test(url))
             url = null;
@@ -273,7 +273,7 @@ var TMP_tabDNDObserver = {
       // scroll without button
       else if (event.screenX <= tabStrip.scrollBoxObject.screenX)
         targetAnonid = ltr ? "scrollbutton-up" : "scrollbutton-down";
-      else if(event.screenX >= (tabStrip.scrollBoxObject.screenX + tabStrip.scrollBoxObject.width))
+      else if (event.screenX >= (tabStrip.scrollBoxObject.screenX + tabStrip.scrollBoxObject.width))
         targetAnonid = ltr ? "scrollbutton-down" : "scrollbutton-up";
       switch (targetAnonid) {
         case "scrollbutton-up":
@@ -305,7 +305,7 @@ var TMP_tabDNDObserver = {
       }
     }
 
-    if ( replaceTab || hideIndicator || !canDrop) {
+    if (replaceTab || hideIndicator || !canDrop) {
       this.clearDragmark();
       return;
     }
@@ -412,7 +412,7 @@ var TMP_tabDNDObserver = {
       // Pass true to disallow dropping javascript: or data: urls
       let url;
       try {
-        url = browserDragAndDrop.drop(event, { }, true);
+        url = browserDragAndDrop.drop(event, {}, true);
       } catch (ex) {}
 
       if (!url)
@@ -442,7 +442,7 @@ var TMP_tabDNDObserver = {
           browser.loadURIWithFlags(url, flags);
           if (!bgLoad)
             gBrowser.tabContainer.selectedItem = tab;
-        } catch(ex) {
+        } catch (ex) {
           // Just ignore invalid urls
           Tabmix.log("load\n" + ex);
         }
@@ -564,7 +564,7 @@ var TMP_tabDNDObserver = {
     this.updateStatusField();
   },
 
-  updateStatusField: function () {
+  updateStatusField: function() {
     var statusTextFld = document.getElementById("statusbar-display");
     if (statusTextFld && this.statusFieldChanged) {
       statusTextFld.label = "";
@@ -576,7 +576,7 @@ var TMP_tabDNDObserver = {
   },
 
   // get _tPos from group index
-  _getDNDIndex: function (aEvent) {
+  _getDNDIndex: function(aEvent) {
     var indexInGroup = this.getNewIndex(aEvent);
     var tabs = gBrowser.visibleTabs;
     var lastIndex = tabs.length - 1;
@@ -585,7 +585,7 @@ var TMP_tabDNDObserver = {
     return tabs[indexInGroup]._tPos;
   },
 
-  getNewIndex: function (event) {
+  getNewIndex: function(event) {
     let getTabRowNumber = (tab, top) => tab.pinned ? 1 : Tabmix.tabsUtils.getTabRowNumber(tab, top);
     // if mX is less then the first tab return 0
     // check if mY is below the tab.... if yes go to next row
@@ -610,19 +610,19 @@ var TMP_tabDNDObserver = {
         let tab = tabs[i];
         let thisRow = getTabRowNumber(tab, topY);
         if (mY >= tab.boxObject.screenY + tab.boxObject.height) {
-          while (i < numTabs - 1 && getTabRowNumber(tabs[i+1], topY) == thisRow)
+          while (i < numTabs - 1 && getTabRowNumber(tabs[i + 1], topY) == thisRow)
             i++;
         }
         else if (Tabmix.compare(mX, Tabmix.itemEnd(tab, Tabmix.ltr), Tabmix.ltr))
           return i;
-        else if (i == numTabs - 1 || getTabRowNumber(tabs[i+1], topY) != thisRow)
+        else if (i == numTabs - 1 || getTabRowNumber(tabs[i + 1], topY) != thisRow)
           return i;
       }
     }
     return numTabs;
   },
 
-  getLeft_Right: function (event, newIndex, oldIndex, draggeType) {
+  getLeft_Right: function(event, newIndex, oldIndex, draggeType) {
    var mX = event.screenX;
    var left_right;
    var tab = gBrowser.tabs[newIndex];
@@ -635,7 +635,7 @@ var TMP_tabDNDObserver = {
    var lockedTab = tab.getAttribute("locked") && !gBrowser.isBlankNotBusyTab(tab);
    if ((draggeType == this.DRAG_LINK && lockedTab) || (draggeType == this.DRAG_LINK && !lockedTab && !isCtrlKey)) {
       left_right = (mX < tabBo.screenX + tabBo.width / 4) ? _left : _right;
-      if (left_right == _right && mX < tabBo.screenX + tabBo.width * 3 / 4 )
+      if (left_right == _right && mX < tabBo.screenX + tabBo.width * 3 / 4)
          left_right = -1;
    }
    else {
@@ -672,11 +672,11 @@ var TMP_tabDNDObserver = {
 
    if (!Tabmix.prefs.getBoolPref("useFirefoxDragmark")) {
       var sameRow = newIndex !== 0 && newIndex != gBrowser.tabs.length &&
-            TabmixTabbar.inSameRow(gBrowser.tabs[newIndex-1], gBrowser.tabs[newIndex]);
+            TabmixTabbar.inSameRow(gBrowser.tabs[newIndex - 1], gBrowser.tabs[newIndex]);
       if (sameRow || left_right === 0)
          this.setDragmarkAttribute(gBrowser.tabs[newIndex], "atLeft");
       if (sameRow || left_right == 1)
-         this.setDragmarkAttribute(gBrowser.tabs[newIndex-1], "atRight");
+         this.setDragmarkAttribute(gBrowser.tabs[newIndex - 1], "atRight");
    }
    else {
       // code for firefox indicator
@@ -693,8 +693,8 @@ var TMP_tabDNDObserver = {
 
       tabRect = gBrowser.tabs[index].getBoundingClientRect();
       if (ltr)
-         newMargin = tabRect.left - rect.left  +
-                     (left_right == 1 ? tabRect.width + this.LinuxMarginEnd: 0) -
+         newMargin = tabRect.left - rect.left +
+                     (left_right == 1 ? tabRect.width + this.LinuxMarginEnd : 0) -
                      this.paddingLeft;
       else
          newMargin = rect.right - tabRect.left -
@@ -741,8 +741,8 @@ var TMP_tabDNDObserver = {
       var index = this.dragmarkindex.newIndex;
       if (index != gBrowser.tabs.length && gBrowser.tabs[index].hasAttribute("dragmark"))
          this.removetDragmarkAttribute(gBrowser.tabs[index]);
-      if (index !== 0 && gBrowser.tabs[index-1].hasAttribute("dragmark"))
-         this.removetDragmarkAttribute(gBrowser.tabs[index-1]);
+      if (index !== 0 && gBrowser.tabs[index - 1].hasAttribute("dragmark"))
+         this.removetDragmarkAttribute(gBrowser.tabs[index - 1]);
     }
     else
       this.setFirefoxDropIndicator(false);
@@ -750,15 +750,15 @@ var TMP_tabDNDObserver = {
     this.dragmarkindex = null;
   },
 
-  setFirefoxDropIndicator: function (val) {
+  setFirefoxDropIndicator: function(val) {
     gBrowser.tabContainer._tabDropIndicator.collapsed = !val;
   },
 
-  removetDragmarkAttribute: function (tab) {
+  removetDragmarkAttribute: function(tab) {
     tab.removeAttribute("dragmark");
   },
 
-  setDragmarkAttribute: function (tab, markSide) {
+  setDragmarkAttribute: function(tab, markSide) {
     tab.setAttribute("dragmark", markSide);
   },
 
@@ -779,7 +779,7 @@ var TMP_tabDNDObserver = {
         // Do not allow transfering a private tab to a non-private window
         // and vice versa.
         (Tabmix.isVersion(200) && PrivateBrowsingUtils.isWindowPrivate(window) !=
-            PrivateBrowsingUtils.isWindowPrivate(sourceNode.ownerDocument.defaultView))){
+            PrivateBrowsingUtils.isWindowPrivate(sourceNode.ownerDocument.defaultView))) {
         return (dt.effectAllowed = "none");
       }
 
@@ -820,7 +820,7 @@ var TMP_tabDNDObserver = {
 }; // TMP_tabDNDObserver end
 
 var TMP_undocloseTabButtonObserver = {
-  onDragOver: function (aEvent) {
+  onDragOver: function(aEvent) {
     var dt = aEvent.dataTransfer;
     var sourceNode = TMP_tabDNDObserver.getSourceNode(dt) || this.NEW_getSourceNode(dt);
     if (!sourceNode || sourceNode.localName != "tab") {
@@ -845,7 +845,7 @@ var TMP_undocloseTabButtonObserver = {
     return true;
   },
 
-  onDragExit: function (aEvent) {
+  onDragExit: function(aEvent) {
     if (aEvent.target.hasAttribute("dragover")) {
       var statusTextFld = document.getElementById("statusbar-display");
       if (statusTextFld)
@@ -857,12 +857,12 @@ var TMP_undocloseTabButtonObserver = {
     }
   },
 
-  onDrop: function (aEvent) {
+  onDrop: function(aEvent) {
     var dt = aEvent.dataTransfer;
     var sourceNode = TMP_tabDNDObserver.getSourceNode(dt) || this.NEW_getSourceNode(dt);
     if (sourceNode && sourceNode.localName == "tab")
       // let tabbrowser drag event time to end before we remove the sourceNode
-      setTimeout( function (b, aTab) {b.removeTab(aTab, {animate: true});}, 0, gBrowser, sourceNode);
+      setTimeout(function(b, aTab) {b.removeTab(aTab, {animate: true});}, 0, gBrowser, sourceNode);
 
     this.onDragExit(aEvent);
   },
@@ -909,7 +909,7 @@ Tabmix.whereToOpen = function TMP_whereToOpen(pref, altKey) {
       // so here we reverse the pref if user press Alt key
       openTabPref = (altKey ^ openTabPref) == 1;
    }
-   return { inNew: !isBlankTab && (isLockTab || openTabPref), lock: isLockTab };
+   return {inNew: !isBlankTab && (isLockTab || openTabPref), lock: isLockTab};
 };
 
 Tabmix.getStyle = function TMP_getStyle(aObj, aStyle) {
@@ -940,7 +940,7 @@ var TMP_TabView = { /* jshint ignore: line */
     return (this.installed = installed);
   },
 
-  checkTabs: function (tabs) {
+  checkTabs: function(tabs) {
     var firstTab;
     for (var i = 0; i < tabs.length; i++) {
       let tab = tabs[i];
@@ -953,12 +953,12 @@ var TMP_TabView = { /* jshint ignore: line */
   },
 
   // includung _removingTabs
-  currentGroup: function () {
+  currentGroup: function() {
     return Array.filter(gBrowser.tabs, tab => !tab.hidden);
   },
 
   // visibleTabs don't include  _removingTabs
-  getTabPosInCurrentGroup: function (aTab) {
+  getTabPosInCurrentGroup: function(aTab) {
     if (aTab) {
       let tabs = Array.filter(gBrowser.tabs, tab => !tab.hidden);
       return tabs.indexOf(aTab);
@@ -966,7 +966,7 @@ var TMP_TabView = { /* jshint ignore: line */
     return -1;
   },
 
-  getIndexInVisibleTabsFromTab: function (aTab) {
+  getIndexInVisibleTabsFromTab: function(aTab) {
     if (aTab)
       return gBrowser.visibleTabs.indexOf(aTab);
     return -1;
@@ -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',
@@ -1296,7 +1296,7 @@ Tabmix.navToolbox = {
     if (alltabsPopup && !alltabsPopup._tabmix_inited) {
       alltabsPopup._tabmix_inited = true;
       alltabsPopup.setAttribute("context", gBrowser.tabContextMenu.id);
-      alltabsPopup.__ensureElementIsVisible = function () {
+      alltabsPopup.__ensureElementIsVisible = function() {
         let scrollBox = document.getAnonymousElementByAttribute(this, "class", "popup-internal-box");
         scrollBox.ensureElementIsVisible(gBrowser.mCurrentTab.mCorrespondingMenuitem);
       };
@@ -1319,7 +1319,7 @@ Tabmix.navToolbox = {
     this.setScrollButtons();
     try {
       this.setCloseButtonPosition();
-    } catch(ex) { }
+    } catch (ex) { }
     gTMPprefObserver.changeNewTabButtonSide(Tabmix.prefs.getIntPref("newTabButton.position"));
     this.setScrollButtons(false, true);
 
diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index 0df0033..d62bbd3 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -14,7 +14,7 @@
       case "TabShow":
         if (!gBrowser.tabContainer._onDelayTabShow) {
           // pass aEvent to this function for use in TGM
-          gBrowser.tabContainer._onDelayTabShow = window.setTimeout(function (aEvent) {
+          gBrowser.tabContainer._onDelayTabShow = window.setTimeout(function(aEvent) {
             gBrowser.tabContainer._onDelayTabShow = null;
             TMP_eventListener.onTabOpen_delayUpdateTabBar(aEvent.target);
           }, 0, aEvent);
@@ -23,7 +23,7 @@
       case "TabHide":
         if (!gBrowser.tabContainer._onDelayTabHide) {
           // pass aEvent to this function for use in TGM
-          gBrowser.tabContainer._onDelayTabHide = window.setTimeout(function (aEvent) {
+          gBrowser.tabContainer._onDelayTabHide = window.setTimeout(function(aEvent) {
             gBrowser.tabContainer._onDelayTabHide = null;
             let tab = aEvent.target;
             TMP_eventListener.onTabClose_updateTabBar(tab);
@@ -152,7 +152,7 @@
       let Utils = TabView._window.Utils;
       Utils.assertThrow(TabItems._reconnectingPaused, "should already be paused");
       TabItems._reconnectingPaused = false;
-      Array.forEach(gBrowser.tabs, function (tab){
+      Array.forEach(gBrowser.tabs, function(tab) {
         if (tab.pinned)
           return;
         let item = tab._tabViewTabItem;
@@ -166,7 +166,7 @@
     };
   };
 
-  TMP_TabView._resetTabviewFrame = function SM__resetTabviewFrame(){
+  TMP_TabView._resetTabviewFrame = function SM__resetTabviewFrame() {
     var tabView = document.getElementById("tab-view-deck");
     if (tabView) {
       tabView.removeEventListener("tabviewhidden", this, false);
@@ -229,7 +229,7 @@
 
   TabmixSessionManager.groupUpdates = {};
   TabmixSessionManager._tabviewData = {};
-  TabmixSessionManager._groupItems=  null;
+  TabmixSessionManager._groupItems = null;
 
   // aWindow: rdfNodeWindow to read from
   TabmixSessionManager._getSessionTabviewData = function SM__getSessionTabviewData(aWindow) {
@@ -270,13 +270,13 @@
       this.removeAttribute(this.gThisWin, id);
   };
 
-  TabmixSessionManager._setTabviewTab = function SM__setTabviewTab(aTab, tabdata, activeGroupId){
+  TabmixSessionManager._setTabviewTab = function SM__setTabviewTab(aTab, tabdata, activeGroupId) {
     if (tabdata.pinned)
       return;
 
     let parsedData;
     function setData(id) {
-      let data = { groupID: id };
+      let data = {groupID: id};
       parsedData = data;
       return TabmixSvc.JSON.stringify(data);
     }
@@ -345,7 +345,7 @@
     if (!excludeTabs)
       excludeTabs = [];
 
-    return !Array.some(gBrowser.tabs, function(tab){
+    return !Array.some(gBrowser.tabs, function(tab) {
       if (!tab.pinned && !tab.hidden && !tab.closing && excludeTabs.indexOf(tab) == -1) {
         return true;
       }
@@ -359,8 +359,8 @@
       aGroupsData.activeGroupId = groupID;
       this._lastSessionGroupName = "";
     }
-    let bounds = {left:0, top:0, width:350, height:300};
-    aGroupItems[groupID] = {bounds:bounds, userSize:null, title:"", id:groupID, newItem: true};
+    let bounds = {left: 0, top: 0, width: 350, height: 300};
+    aGroupItems[groupID] = {bounds: bounds, userSize: null, title: "", id: groupID, newItem: true};
     aGroupsData.totalNumber = Object.keys(aGroupItems).length;
     this._tabviewData["tabview-group"] = aGroupItems;
     this._tabviewData["tabview-groups"] = aGroupsData;
@@ -385,7 +385,7 @@
     let keys = Object.keys(aGroupItems);
     if (!aGroupsData.nextID) {
       let nextID = 0;
-      keys.forEach(function (key) {
+      keys.forEach(function(key) {
         nextID = Math.max(aGroupItems[key].id, nextID);
       });
       aGroupsData.nextID = nextID++;
@@ -434,10 +434,10 @@
 
         // update tabs data
         let groupID = newGroupsData.activeGroupId;
-        Array.forEach(gBrowser.tabs, function(tab){
+        Array.forEach(gBrowser.tabs, function(tab) {
           if (tab.pinned || tab.hidden || tab.closing || blankTabs.indexOf(tab) > -1)
             return;
-          let data = { groupID: groupID };
+          let data = {groupID: groupID};
           data = TabmixSvc.JSON.stringify(data);
           TabmixSvc.ss.setTabValue(tab, "tabview-tab", data);
           if (this.enableBackup)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index ea42a56..6e37482 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -2,9 +2,9 @@
 
 if (!window.tablib || tablib.version != "tabmixplus")
 var tablib = {
-  version : "tabmixplus",
+  version: "tabmixplus",
   _inited: false,
-  init : function TMP_tablib_init () {
+  init: function TMP_tablib_init() {
     if (this._inited)
       return;
     this._inited = true;
@@ -132,7 +132,7 @@ var tablib = {
       [obj, fnName] = [gBrowser, "addTab"];
 
     Tabmix.changeCode(obj, "gBrowser." + fnName)._replace(
-      '{','{\n\
+      '{', '{\n\
       let dontMove, isPending, isRestoringTab = Tabmix.callerName() == "ssi_restoreWindow";\n'
     )._replace(
       'let params = arguments[1];',
@@ -180,14 +180,13 @@ var tablib = {
       '  else if (!Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent"))' +
       '    aRelatedToCurrent = true;' +
       '}'
-    )._replace( //  new tab can trigger selection change by some extensions (divX HiQ)
+    )._replace(//  new tab can trigger selection change by some extensions (divX HiQ)
       't.owner = this.selectedTab;', 't.owner = _selectedTab;'
     ).toCode();
 
     gBrowser.TMP_blockedCallers = ["sss_restoreWindow", "ssi_restoreWindow", // ssi_restoreWindow from Firefox 16+
                                    "sss_duplicateTab", "ssi_duplicateTab"]; // ssi_duplicateTab from Firefox 16+
 
-
     // ContextMenu Extensions raplce the original removeTab function
     var _removeTab = "removeTab";
     if ("__ctxextensions__removeTab" in gBrowser)
@@ -321,7 +320,7 @@ var tablib = {
     if (Tabmix._restoreMultipleTabs) {
       Tabmix.changeCode(gBrowser, "gBrowser.removeTabsToTheEndFrom")._replace(
         'let tabs = this.getTabsToTheEndFrom(aTab);',
-        '$&\n'+
+        '$&\n' +
         '              Tabmix.startCountingClosedTabs();'
       )._replace(
         '#1.setNumberOfTabsClosedLast(window, numberOfTabsToClose);'.
@@ -419,10 +418,9 @@ var tablib = {
       'this.tabContainer.mCloseButtons = Services.prefs.getIntPref(data);',
       'break;'
     )._replace(
-      'this.tabContainer.updateVisibility();',  '', {check: !Tabmix.isVersion(230)}
+      'this.tabContainer.updateVisibility();', '', {check: !Tabmix.isVersion(230)}
     ).toCode();
 
-
     if (Tabmix.isVersion(230)) {
       Tabmix.changeCode(tabBar, "gBrowser.tabContainer.updateVisibility")._replace(
         'window.toolbar.visible',
@@ -494,7 +492,7 @@ var tablib = {
       '{if(!Tabmix.prefs.getBoolPref("selectTabOnMouseDown") && Tabmix.isCallerInList("onxblmousedown")) return;'
     ).toCode();
 
-    Tabmix.changeCode(tabBar,  "gBrowser.tabContainer.visible", {setter: true})._replace(
+    Tabmix.changeCode(tabBar, "gBrowser.tabContainer.visible", {setter: true})._replace(
       'this._container.collapsed = !val;',
       '  if (TabmixTabbar.hideMode == 2)' +
       '    val = false;' +
@@ -844,7 +842,7 @@ var tablib = {
       '                                   document.getElementById(arguments[0]);'
     )._replace(
       /(\})(\)?)$/,
-      '  tablib.populateUndoWindowSubmenu(undoPopup);\n'+
+      '  tablib.populateUndoWindowSubmenu(undoPopup);\n' +
       '$1$2'
     ).toCode();
 
@@ -964,8 +962,8 @@ var tablib = {
         try {
           var activeIndex = (tabState.index || tabState.entries.length) - 1;
           var entriesToRemove = 0;
-          var newEntry = { url: aHref }; // we don't know the page title at this moment
-          tabState.entries.splice(activeIndex + 1 , entriesToRemove, newEntry);
+          var newEntry = {url: aHref}; // we don't know the page title at this moment
+          tabState.entries.splice(activeIndex + 1, entriesToRemove, newEntry);
           tabState.index++;
         } catch (ex) {Tabmix.assert(ex);}
       }
@@ -1011,7 +1009,7 @@ var tablib = {
       return newTab;
     };
 
-    gBrowser.duplicateTabToWindow = function (aTab, aMoveTab, aTabData) {
+    gBrowser.duplicateTabToWindow = function(aTab, aMoveTab, aTabData) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
 
@@ -1030,7 +1028,7 @@ var tablib = {
       }
     };
 
-    gBrowser.openLinkWithHistory = function () {
+    gBrowser.openLinkWithHistory = function() {
       var {target, linkURL, principal} = gContextMenu;
       var url = tablib.getValidUrl(linkURL, target);
       if (!url)
@@ -1058,7 +1056,7 @@ var tablib = {
       '      $&'
     ).toCode(false, Tabmix.originalFunctions, "openInverseLink");
 
-    gBrowser.openInverseLink = function () {
+    gBrowser.openInverseLink = function() {
       var {target, linkURL} = gContextMenu;
       var url = tablib.getValidUrl(linkURL, target);
       if (!url)
@@ -1131,7 +1129,7 @@ var tablib = {
 
       var URL = this.getBrowserForTab(aTab).currentURI.spec;
       var matches = URL.match(/(^.*\/)(.*)/);
-      var aDomain = matches ?  matches[1] : URL;
+      var aDomain = matches ? matches[1] : URL;
 
       if (this.warnAboutClosingTabs(this.closingTabsEnum.GROUP, null, aDomain)) {
         var childNodes = this.visibleTabs;
@@ -1149,21 +1147,21 @@ var tablib = {
       }
     };
 
-    gBrowser._closeLeftTabs = function (aTab) {
+    gBrowser._closeLeftTabs = function(aTab) {
       if (Tabmix.ltr)
         this.closeLeftTabs(aTab);
       else
         this.closeRightTabs(aTab);
     };
 
-    gBrowser._closeRightTabs = function (aTab) {
+    gBrowser._closeRightTabs = function(aTab) {
       if (Tabmix.ltr)
         this.closeRightTabs(aTab);
       else
         this.closeLeftTabs(aTab);
     };
 
-    gBrowser.closeRightTabs = function (aTab) {
+    gBrowser.closeRightTabs = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
 
@@ -1223,41 +1221,41 @@ var tablib = {
       }
     });
 
-    gBrowser._reloadLeftTabs = function (aTab) {
+    gBrowser._reloadLeftTabs = function(aTab) {
       if (Tabmix.ltr)
         this.reloadLeftTabs(aTab);
       else
         this.reloadRightTabs(aTab);
     };
 
-    gBrowser._reloadRightTabs = function (aTab) {
+    gBrowser._reloadRightTabs = function(aTab) {
       if (Tabmix.ltr)
         this.reloadRightTabs(aTab);
       else
         this.reloadLeftTabs(aTab);
     };
 
-    gBrowser.reloadLeftTabs = function (aTab) {
+    gBrowser.reloadLeftTabs = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
       var childNodes = this.visibleTabs;
-      if ( aTab._tPos > this.mCurrentTab._tPos )
+      if (aTab._tPos > this.mCurrentTab._tPos)
         this.selectedTab = aTab;
       let tabPos = childNodes.indexOf(aTab);
       tablib.reloadTabs(childNodes.slice(0, tabPos).reverse());
     };
 
-    gBrowser.reloadRightTabs = function (aTab) {
+    gBrowser.reloadRightTabs = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
       var childNodes = this.visibleTabs;
-      if ( aTab._tPos < this.mCurrentTab._tPos )
+      if (aTab._tPos < this.mCurrentTab._tPos)
         this.selectedTab = aTab;
       let tabPos = childNodes.indexOf(aTab);
       tablib.reloadTabs(childNodes.slice(tabPos + 1));
     };
 
-    gBrowser.reloadAllTabsBut = function (aTab) {
+    gBrowser.reloadAllTabsBut = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
       else
@@ -1265,10 +1263,10 @@ var tablib = {
       tablib.reloadTabs(this.visibleTabs, aTab);
     };
 
-    gBrowser.lockTab = function (aTab) {
+    gBrowser.lockTab = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
-      if ( aTab.hasAttribute("locked") ) {
+      if (aTab.hasAttribute("locked")) {
         aTab.removeAttribute("_lockedAppTabs"); // we only have this if we locked AppTab
         aTab.removeAttribute("locked");
         aTab.setAttribute("_locked", "false");
@@ -1282,10 +1280,10 @@ var tablib = {
       TabmixSessionManager.updateTabProp(aTab);
     };
 
-    gBrowser.protectTab = function (aTab) {
+    gBrowser.protectTab = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
-      if ( aTab.hasAttribute("protected") )
+      if (aTab.hasAttribute("protected"))
         aTab.removeAttribute("protected");
       else
         aTab.setAttribute("protected", "true");
@@ -1297,10 +1295,10 @@ var tablib = {
       }
     };
 
-    gBrowser.freezeTab = function (aTab) {
+    gBrowser.freezeTab = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
-      if ( !aTab.hasAttribute("protected") || !aTab.hasAttribute("locked")){
+      if (!aTab.hasAttribute("protected") || !aTab.hasAttribute("locked")) {
         aTab.setAttribute("protected", "true");
         aTab.setAttribute("locked", "true");
         aTab.setAttribute("_locked", "true");
@@ -1338,7 +1336,7 @@ var tablib = {
       }
     };
 
-    gBrowser.copyTabUrl = function (aTab) {
+    gBrowser.copyTabUrl = function(aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
       var clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
@@ -1361,11 +1359,11 @@ var tablib = {
       var items = Array.filter(this.tabContainer.getElementsByAttribute("tabmix_selectedID", "*"),
           function(tab) {return !tab.hidden && !tab.closing;
       }, this);
-      for (var i = 0; i < items.length; ++i ) {
+      for (var i = 0; i < items.length; ++i) {
         if (aTab && items[i] == aTab)
           continue;
         temp_id = parseInt(items[i].getAttribute("tabmix_selectedID") || 0);
-        if ( temp_id && temp_id > max_id ) {
+        if (temp_id && temp_id > max_id) {
           max_id = temp_id;
           tempIndex = tabs.indexOf(items[i]);
         }
@@ -1374,7 +1372,7 @@ var tablib = {
       return tempIndex;
     };
 
-    gBrowser.previousTab = function (aTab) {
+    gBrowser.previousTab = function(aTab) {
       var tabs = this.visibleTabs;
       if (tabs.length == 1)
         return;
@@ -1390,20 +1388,20 @@ var tablib = {
       this.selectedBrowser.focus();
     };
 
-    gBrowser.selectIndexAfterRemove = function (oldTab) {
+    gBrowser.selectIndexAfterRemove = function(oldTab) {
       var tabs = TMP_TabView.currentGroup();
       var currentIndex = tabs.indexOf(this.mCurrentTab);
       if (this.mCurrentTab != oldTab)
         return currentIndex;
       var l = tabs.length;
-      if (l==1)
+      if (l == 1)
         return 0;
       var mode = Tabmix.prefs.getIntPref("focusTab");
-      switch ( mode ) {
+      switch (mode) {
         case 0: // first tab
           return currentIndex === 0 ? 1 : 0;
         case 1: // left tab
-          return currentIndex === 0 ? 1 : currentIndex-1 ;
+          return currentIndex === 0 ? 1 : currentIndex - 1;
         case 3: // last tab
           return currentIndex == l - 1 ? currentIndex - 1 : l - 1;
         case 6: // last opened
@@ -1448,7 +1446,7 @@ var tablib = {
        // add extra delay after tab removed or after tab flip before we select by hover
        // to let the user time to move the mouse
        if (aTab.mouseHoverSelect) {
-          this.setAttribute("preventMouseHoverSelect",true);
+          this.setAttribute("preventMouseHoverSelect", true);
           var delay = aTab.mouseHoverSelectDelay + 50;
           setTimeout(function removeDelayAfterClose(browser) {
             browser.removeAttribute("preventMouseHoverSelect");
@@ -1457,9 +1455,9 @@ var tablib = {
     };
 
     Object.defineProperty(gBrowser, "closingTabsEnum",
-      {value: { ALL: 0, OTHER: 1, TO_END: 2, ALL_ONEXIT: 3, TO_START: 4, GROUP: 5 }, writable: false});
+      {value: {ALL: 0, OTHER: 1, TO_END: 2, ALL_ONEXIT: 3, TO_START: 4, GROUP: 5}, writable: false});
 
-    let warnAboutClosingTabs = function (whatToClose, aTab, aDomain) {
+    let warnAboutClosingTabs = function(whatToClose, aTab, aDomain) {
       // see tablib.closeWindow comment
       if (Tabmix.isCallerInList("BG__onQuitRequest"))
         return true;
@@ -1474,11 +1472,11 @@ var tablib = {
       // calc the number of tab to close when there is protected tabs.
       let protectedTabs = [];
       function addProtected(tabs) {
-        for (let i = 0; i < tabs.length; i++ ) {
+        for (let i = 0; i < tabs.length; i++) {
           let tab = tabs[i];
           if (!onExit && tab.hidden)
             continue;
-          if (protectedTabs.indexOf(tab) == -1 )
+          if (protectedTabs.indexOf(tab) == -1)
             protectedTabs.push(tabs[i]);
         }
       }
@@ -1539,7 +1537,7 @@ var tablib = {
           tabsToClose = numTabs - 1 - numProtected;
           break;
         case closing.GROUP:
-          for ( i = numTabs - 1; i > -1; --i) {
+          for (i = numTabs - 1; i > -1; --i) {
             let tab = tabs[i];
             if (this.getBrowserForTab(tab).currentURI.spec.indexOf(aDomain) != -1 &&
                 !tab._isProtected)
@@ -1558,7 +1556,7 @@ var tablib = {
           if (!aTab)
             throw new Error("Required argument missing: aTab");
           tabPos = tabs.indexOf(aTab);
-          for ( i = 0; i < protectedTabs.length; i++ ) {
+          for (i = 0; i < protectedTabs.length; i++) {
             let index = tabs.indexOf(protectedTabs[i]);
             if (index <= tabPos)
               --numProtected;
@@ -1569,7 +1567,7 @@ var tablib = {
           if (!aTab)
             throw new Error("Required argument missing: aTab");
           tabPos = tabs.indexOf(aTab);
-          for ( i = 0; i < protectedTabs.length; i++ ) {
+          for (i = 0; i < protectedTabs.length; i++) {
             let index = tabs.indexOf(protectedTabs[i]);
             if (index >= tabPos)
               --numProtected;
@@ -1588,7 +1586,7 @@ var tablib = {
         return true;
 
       // default to true: if it were false, we wouldn't get this far
-      var warnOnClose = { value:true };
+      var warnOnClose = {value: true};
       var bundle = this.mStringBundle;
 
       var message, chkBoxLabel;
@@ -1633,7 +1631,7 @@ var tablib = {
     };
     Tabmix.setNewFunction(gBrowser, "warnAboutClosingTabs", warnAboutClosingTabs);
 
-    gBrowser.TMP_selectNewForegroundTab = function (aTab, aLoadInBackground, aUrl, addOwner) {
+    gBrowser.TMP_selectNewForegroundTab = function(aTab, aLoadInBackground, aUrl, addOwner) {
        var bgLoad = typeof aLoadInBackground == "boolean" ? aLoadInBackground :
                       Services.prefs.getBoolPref("browser.tabs.loadInBackground");
        if (!bgLoad) {
@@ -1718,7 +1716,7 @@ var tablib = {
 
     /** DEPRECATED **/
     // we keep this function to saty compatible with other extensions that use it
-    gBrowser.undoRemoveTab = function () {TMP_ClosedTabs.undoCloseTab();};
+    gBrowser.undoRemoveTab = function() {TMP_ClosedTabs.undoCloseTab();};
     // Tabmix don't use this function anymore
     // but treeStyleTab extension look for it
     gBrowser.restoreTab = function() { };
@@ -1735,7 +1733,7 @@ var tablib = {
           "aForceNotRemote", "aNoReferrer"],
 
   definedParams: function(params) {
-    this.props.forEach(function(prop){
+    this.props.forEach(function(prop) {
       if (typeof params[prop] == "undefined")
         params[prop] = null;
     });
@@ -1860,7 +1858,7 @@ var tablib = {
         return false;
 
       // last windows with tabs
-      var windowtype  = aCountOnlyBrowserWindows ? "navigator:browser" : null;
+      var windowtype = aCountOnlyBrowserWindows ? "navigator:browser" : null;
       if (window.gBrowser.browsers.length < 2 || Tabmix.numberOfWindows(false, windowtype) > 1)
         return false;
 
@@ -1896,7 +1894,7 @@ var tablib = {
       var startTime = new Date().valueOf();
       var oldTime = Services.prefs.prefHasUserValue(pref) ? Services.prefs.getCharPref(pref) : 0;
       canClose = gBrowser.warnAboutClosingTabs(gBrowser.closingTabsEnum.ALL_ONEXIT);
-      Services.prefs.setCharPref(pref, oldTime*1 + (new Date().valueOf() - startTime));
+      Services.prefs.setCharPref(pref, oldTime * 1 + (new Date().valueOf() - startTime));
     }
 
     TabmixSessionManager.windowIsClosing(canClose, isLastWindow, result.saveSession, result.removeClosedTabs);
@@ -1939,7 +1937,7 @@ var tablib = {
         continue;
       try {
         tab.linkedBrowser.reload();
-      } catch (ex) {  }
+      } catch (ex) { }
     }
   }
 
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index f5d8a97..14b3d21 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -167,7 +167,7 @@ var TMP_Places = {
       if (aMenuPopup.id != "goPopup" && aMenuPopup.id != "appmenu_historyMenupopup")
          return;
 
-      for (let i = 0; i < aMenuPopup.childNodes.length ; i++) {
+      for (let i = 0; i < aMenuPopup.childNodes.length; i++) {
          let item = aMenuPopup.childNodes[i];
          if ("_placesNode" in item) {
            let bookMarkName = this.getTitleFromBookmark(item._placesNode.uri);
@@ -210,12 +210,12 @@ var TMP_Places = {
       });
    },
 
-   isBookmarklet: function (url) {
+   isBookmarklet: function(url) {
       var jsURL = /^ *javascript:/;
       return jsURL.test(url) ? true : false;
    },
 
-   fixWhereToOpen: function (aEvent, aWhere, aPref) {
+   fixWhereToOpen: function(aEvent, aWhere, aPref) {
       var w = Tabmix.getTopWin();
       if (!w)
          return aWhere;
@@ -241,7 +241,7 @@ var TMP_Places = {
       return aWhere;
    },
 
-   getPrefByDocumentURI: function (aWindow) {
+   getPrefByDocumentURI: function(aWindow) {
      switch (aWindow.document.documentURI) {
        case "chrome://browser/content/places/places.xul":
          let historyId = PlacesUIUtils.leftPaneQueries["History"];
@@ -268,7 +268,7 @@ var TMP_Places = {
   // fixed: focus the first tab if "extensions.tabmix.openTabNext" is true
   // fixed: remove "selected" and "tabmix_selectedID" from reuse tab
   //
-  //TODO - try to use sessionStore to add many tabs
+  // TODO - try to use sessionStore to add many tabs
   openGroup: function TMP_PC_openGroup(bmGroup, bmIds, aWhere) {
     var tabs = gBrowser.visibleTabs;
 
@@ -282,7 +282,7 @@ var TMP_Places = {
     // catch tab for reuse
     var aTab, reuseTabs = [], removeTabs = [], i;
     var tabIsBlank, canReplace;
-    for (i = 0; i < tabs.length ; i++) {
+    for (i = 0; i < tabs.length; i++) {
        aTab = tabs[i];
        tabIsBlank = gBrowser.isBlankNotBusyTab(aTab);
        // don't reuse collapsed tab if width fitTitle is set
@@ -303,7 +303,7 @@ var TMP_Places = {
                    gBrowser.mCurrentTab : Tabmix.visibleTabs.last;
     var tabPos, index;
     var multiple = bmGroup.length > 1;
-    for (i = 0; i < bmGroup.length ; i++) {
+    for (i = 0; i < bmGroup.length; i++) {
        let url = bmGroup[i];
        try { // bug 300911
           if (i < reuseTabs.length) {
@@ -324,7 +324,7 @@ var TMP_Places = {
              aTab = gBrowser.addTab(url, {skipAnimation: multiple, dontMove: true});
 
           this.setTabTitle(aTab, url, bmIds[i]);
-       } catch (er) {  }
+       } catch (er) { }
 
        if (!tabToSelect)
           tabToSelect = aTab;
@@ -396,7 +396,7 @@ var TMP_Places = {
     return newTitle || title;
   },
 
-   _getBookmarkTitle: function (aUrl, aID) {
+   _getBookmarkTitle: function(aUrl, aID) {
       let aItemId = aID.value || -1;
       try {
          if (aItemId > -1) {
@@ -420,7 +420,7 @@ var TMP_Places = {
     return (this._titlefrombookmark = Tabmix.prefs.getBoolPref("titlefrombookmark"));
   },
 
-  applyCallBackOnUrl: function (aUrl, aCallBack) {
+  applyCallBackOnUrl: function(aUrl, aCallBack) {
  ///XXX need to work with nsURI
     let hasHref = aUrl.indexOf("#") > -1;
     let result = aCallBack.apply(this, [aUrl]) ||
@@ -453,7 +453,7 @@ var TMP_Places = {
     return title || aTitle;
   },
 
-  isUserRenameTab: function (aTab, aUrl) {
+  isUserRenameTab: function(aTab, aUrl) {
     if (aTab.hasAttribute("label-uri")) {
       let label = aTab.getAttribute("label-uri");
       if (label == aUrl || label == "*")
@@ -488,11 +488,11 @@ var TMP_Places = {
     // Start observing bookmarks if needed.
     if (!this._hasBookmarksObserver) {
       if (!Tabmix.isVersion(210))
-        this.onBeforeItemRemoved = function () {};
+        this.onBeforeItemRemoved = function() {};
       try {
         PlacesUtils.addLazyBookmarkObserver(this);
         this._hasBookmarksObserver = true;
-      } catch(ex) {
+      } catch (ex) {
         Tabmix.reportError(ex, "Failed to add bookmarks observer:");
       }
     }
@@ -505,7 +505,7 @@ var TMP_Places = {
     }
   },
 
-  onDelayedStartup: function () {
+  onDelayedStartup: function() {
     if (!this._titlefrombookmark || !gBrowser.tabs)
       return;
 
@@ -513,7 +513,7 @@ var TMP_Places = {
   },
 
   // extensions.tabmix.titlefrombookmark changed
-  onPreferencChanged: function (aPrefValue) {
+  onPreferencChanged: function(aPrefValue) {
     this._titlefrombookmark = aPrefValue;
 
     if (aPrefValue) {
@@ -562,7 +562,7 @@ var TMP_Places = {
         return;
       let index = this.applyCallBackOnUrl(url, getIndex);
       if (index) {
-        tab.setAttribute("tabmix_bookmarkId", aItemId[index-1]);
+        tab.setAttribute("tabmix_bookmarkId", aItemId[index - 1]);
         this.setTabTitle(tab, url);
       }
     }, this);
@@ -620,7 +620,7 @@ var TMP_Places = {
   },
 
   onBeginUpdateBatch: function TMP_PC_onBeginUpdateBatch() {
-    this._batchData = {updateIDs:[], add:{ids:[], urls:[]}};
+    this._batchData = {updateIDs: [], add: {ids: [], urls: []}};
     this.inUpdateBatch = true;
 
     if (TabmixTabbar.widthFitTitle &&
@@ -637,14 +637,14 @@ var TMP_Places = {
     if (updateIDs.length)
       this.updateTitleonTabs(updateIDs);
 
-    this._batchData = {updateIDs:[], add:{ids:[], urls:[]}};
+    this._batchData = {updateIDs: [], add: {ids: [], urls: []}};
 
     this.afterTabTitleChanged();
     this.currentTab = null;
   },
 
-  onItemVisited: function () {},
-  onItemMoved: function () {}
+  onItemVisited: function() {},
+  onItemMoved: function() {}
 };
 
 TMP_Places.contextMenu = {
@@ -654,7 +654,7 @@ TMP_Places.contextMenu = {
     document.getElementById("placesContext")[eventListener]("popupshowing", this, false);
   },
 
-  handleEvent: function (aEvent) {
+  handleEvent: function(aEvent) {
     switch (aEvent.type) {
       case "popupshowing":
         this.buildContextMenu();
diff --git a/chrome/content/preferences/appearance.js b/chrome/content/preferences/appearance.js
index 79a7b02..bb7f2dd 100644
--- a/chrome/content/preferences/appearance.js
+++ b/chrome/content/preferences/appearance.js
@@ -1,7 +1,7 @@
 "use strict";
 
 var gAppearancePane = { // jshint ignore:line
-  init: function () {
+  init: function() {
     var browserWindow = Tabmix.getTopWin();
     // disable options for position the tabbar and scroll mode if TreeStyleTab extension installed
     if (browserWindow.Tabmix.extensions.verticalTabBar) {
@@ -57,7 +57,7 @@ var gAppearancePane = { // jshint ignore:line
       menulist.parentNode.removeAttribute("pack");
       menulist.parentNode.removeAttribute("class");
       hbox.setAttribute("orient", "horizontal");
-      hbox.setAttribute("align","center");
+      hbox.setAttribute("align", "center");
     }
 
     gPrefWindow.initPane("paneAppearance");
@@ -101,7 +101,7 @@ var gAppearancePane = { // jshint ignore:line
     var buttons = ["btn_sessionmanager", "btn_undoclose", "btn_closedwindows", "btn_tabslist"];
     var onToolbar = $("onToolbar");
     var onPlate = $("onPlate");
-    for (let i = 0; i < buttons.length; ++i ) {
+    for (let i = 0; i < buttons.length; ++i) {
       let button = aWindow.document.getElementById(buttons[i]);
       let optionButton = $("_" + buttons[i]).parentNode;
       if (button)
@@ -115,7 +115,7 @@ var gAppearancePane = { // jshint ignore:line
     // Display > Tab bar
     function updateDisabledState(buttonID, itemID, aEnable) {
       let button = aWindow.document.getElementById(buttonID);
-      let enablePosition =  button && button.parentNode == aWindow.document.getElementById("TabsToolbar");
+      let enablePosition = button && button.parentNode == aWindow.document.getElementById("TabsToolbar");
       gPrefWindow.setDisabled(itemID, !enablePosition || null);
       gPrefWindow.setDisabled("obs_" + itemID, !aEnable || !enablePosition || null);
     }
diff --git a/chrome/content/preferences/events.js b/chrome/content/preferences/events.js
index c8b37e8..10fe4dc 100644
--- a/chrome/content/preferences/events.js
+++ b/chrome/content/preferences/events.js
@@ -2,7 +2,7 @@
 "use strict";
 
 var gEventsPane = {
-  init: function () {
+  init: function() {
     // for locales with long labels
     var hbox = $("focusTab-box");
     var label = $("focusTab-label").boxObject.width;
@@ -10,7 +10,7 @@ var gEventsPane = {
     if (hbox.boxObject.width > label + menulist.boxObject.width) {
       menulist.parentNode.removeAttribute("pack");
       hbox.setAttribute("orient", "horizontal");
-      hbox.setAttribute("align","center");
+      hbox.setAttribute("align", "center");
     }
 
     var browserWindow = Tabmix.getTopWin();
@@ -52,7 +52,7 @@ var gEventsPane = {
     gPrefWindow.initPane("paneEvents");
   },
 
-  disabeleShowTabList: function () {
+  disabeleShowTabList: function() {
     var ctrlTabPv = $("pref_ctrltab.tabPreviews");
     var disableShowTabList = $("pref_ctrltab").value &&
                              ctrlTabPv && ctrlTabPv.value;
@@ -73,14 +73,14 @@ var gEventsPane = {
   newTabUrl: function(preference, disable, setFocus) {
     var showTabUrlBox = preference.value == 4;
     var item = $(preference.id.replace("pref_", ""));
-    var idnum = item.getAttribute("idnum") || "" ;
+    var idnum = item.getAttribute("idnum") || "";
     gPrefWindow.setDisabled("newTabUrlLabel" + idnum, !showTabUrlBox || disable);
     gPrefWindow.setDisabled("newTabUrl" + idnum, !showTabUrlBox || disable);
     if (setFocus && showTabUrlBox)
       $("newTabUrl" + idnum).focus();
   },
 
-  syncFromNewTabUrlPref: function (item) {
+  syncFromNewTabUrlPref: function(item) {
     var preference = $(item.getAttribute("preference"));
     // If the pref is set to the default, set the value to ""
     // to show the placeholder text
@@ -90,7 +90,7 @@ var gEventsPane = {
     return this.syncToNewTabUrlPref(value);
   },
 
-  syncToNewTabUrlPref: function (value) {
+  syncToNewTabUrlPref: function(value) {
     // If the value is "", use about:newtab.
     if (value === "")
       return "about:newtab";
@@ -111,7 +111,7 @@ var gEventsPane = {
     gPrefWindow.setDisabled("inverselinks", val != 2 && $("midcurrent").checked);
   },
 
-  editSlideShowKey: function () {
+  editSlideShowKey: function() {
     document.documentElement.showPane($("paneMenu"));
     if (typeof gMenuPane == "object")
       gMenuPane.editSlideShowKey();
diff --git a/chrome/content/preferences/links.js b/chrome/content/preferences/links.js
index c3c4a96..5e9baa8 100644
--- a/chrome/content/preferences/links.js
+++ b/chrome/content/preferences/links.js
@@ -1,7 +1,7 @@
 "use strict";
 
 var gLinksPane = {
-  init: function () {
+  init: function() {
     this.singleWindow($("singleWindow").checked);
     gLinksPane.externalLinkValue($("externalLink").checked);
 
@@ -20,7 +20,7 @@ var gLinksPane = {
     gPrefWindow.setDisabled("obs_externalLink", !checked);
   },
 
-  updateExternalLinkCeckbox: function (external) {
+  updateExternalLinkCeckbox: function(external) {
     let preference = $(external.getAttribute("preference"));
     if (external.value == preference.value)
       return;
diff --git a/chrome/content/preferences/menu.js b/chrome/content/preferences/menu.js
index 4efa04e..db0a45e 100644
--- a/chrome/content/preferences/menu.js
+++ b/chrome/content/preferences/menu.js
@@ -1,7 +1,7 @@
 "use strict";
 
 var gMenuPane = { // jshint ignore:line
-  init: function () {
+  init: function() {
     $("pinTab").label = gPrefWindow.pinTabLabel;
     $("togglePinTab").setAttribute("label", gPrefWindow.pinTabLabel);
     $("clearClosedTabs").setAttribute("label", TabmixSvc.getString("undoclosetab.clear.label"));
@@ -43,7 +43,7 @@ var gMenuPane = { // jshint ignore:line
     let paneMenu = $("paneMenu");
     if (paneMenu.hasAttribute("editSlideShowKey")) {
       paneMenu.removeAttribute("editSlideShowKey");
-      setTimeout(function(self) {self.editSlideShowKey();},0, this);
+      setTimeout(function(self) {self.editSlideShowKey();}, 0, this);
     }
 
     gPrefWindow.initPane("paneMenu");
@@ -64,7 +64,7 @@ var gMenuPane = { // jshint ignore:line
   },
 
   _slideShow: "",
-  updateShortcuts: function (aShortcuts, aCallBack) {
+  updateShortcuts: function(aShortcuts, aCallBack) {
     let boxes = Array.filter(aShortcuts.childNodes, aCallBack);
     $("shortcuts-panel").setAttribute("usedKeys", boxes.length > 0);
     if (this._slideShow != $("shortcut-group").keys.slideShow) {
@@ -73,14 +73,14 @@ var gMenuPane = { // jshint ignore:line
     }
   },
 
-  setSlideShowLabel: function () {
+  setSlideShowLabel: function() {
     let slideShow = $("slideShow");
     let label = slideShow.disabled ? "??" : getFormattedKey(slideShow.key);
     $("slideDelayLabel").value = slideShow.getAttribute("_label").replace("#1", label);
     gPrefWindow.setDisabled("obs_slideDelay", slideShow.disabled);
   },
 
-  editSlideShowKey: function () {
+  editSlideShowKey: function() {
     $("menu").selectedIndex = 3;
     let slideShow = $("slideShow");
     let item = $("hide-unused-shortcuts");
diff --git a/chrome/content/preferences/mouse.js b/chrome/content/preferences/mouse.js
index 075a345..f06ded6 100644
--- a/chrome/content/preferences/mouse.js
+++ b/chrome/content/preferences/mouse.js
@@ -4,7 +4,7 @@ var gMousePane = {
   _inited: false,
   clickTab: null,
   clickTabbar: null,
-  init: function () {
+  init: function() {
     this._inited = true;
 
     if (TabmixSvc.isMac) {
@@ -31,7 +31,7 @@ var gMousePane = {
     gPrefWindow.initPane("paneMouse");
   },
 
-  tabSelectionChanged: function (aEvent) {
+  tabSelectionChanged: function(aEvent) {
     if (aEvent.target.localName != "tabs")
       return;
     gPrefWindow.tabSelectionChanged(aEvent);
@@ -41,7 +41,7 @@ var gMousePane = {
   },
 
   _options: ["dbl", "middle", "ctrl", "shift", "alt"],
-  updatePanelPrefs: function (aIndex) {
+  updatePanelPrefs: function(aIndex) {
     let panel = this._options[aIndex];
     let prefID = "pref_" + panel + "ClickTab";
     // update "ClickTab" menulist
@@ -55,24 +55,24 @@ var gMousePane = {
     Tabmix.setItem(this.clickTabbar.previousSibling, "disabled", disabled || null);
   },
 
-  updatePref: function (element, prefID) {
+  updatePref: function(element, prefID) {
     let preference = $(prefID);
     element.setAttribute("preference", prefID);
     preference.setElementValue(element);
   },
 
-  ensureElementIsVisible: function (aPopup) {
+  ensureElementIsVisible: function(aPopup) {
     var scrollBox = document.getAnonymousElementByAttribute(aPopup, "class", "popup-internal-box");
     scrollBox.ensureElementIsVisible(aPopup.parentNode.selectedItem);
   },
 
-  resetPreference: function (checkbox) {
+  resetPreference: function(checkbox) {
     let menulist = $(checkbox.getAttribute("control"));
     let prefID = menulist.getAttribute("preference");
     $(prefID).valueFromPreferences = checkbox.checked ? (menulist[prefID] || undefined) : -1;
   },
 
-  setCheckedState: function (menulist) {
+  setCheckedState: function(menulist) {
     let prefID = menulist.getAttribute("preference");
     let val = $(prefID).value;
     if (val != -1)
@@ -81,7 +81,7 @@ var gMousePane = {
     menulist.previousSibling.checked = !menulist.disabled;
   },
 
-  updatedblClickTabbar: function (pref) {
+  updatedblClickTabbar: function(pref) {
     let dblClickTabbar = $("pref_dblclick_changesize");
     if (pref.value && !dblClickTabbar.value)
       dblClickTabbar.value = pref.value;
diff --git a/chrome/content/preferences/overlay/overlaySanitizeUI.js b/chrome/content/preferences/overlay/overlaySanitizeUI.js
index 5f3768c..9ae6ba3 100644
--- a/chrome/content/preferences/overlay/overlaySanitizeUI.js
+++ b/chrome/content/preferences/overlay/overlaySanitizeUI.js
@@ -1,7 +1,7 @@
 "use strict";
 
 Tabmix.setSanitizer = {
-  init: function () {
+  init: function() {
     this.isPromptDialog = typeof window.gSanitizePromptDialog == "object";
     this.addSanitizeItem();
     this.addMenuItem();
@@ -14,17 +14,17 @@ Tabmix.setSanitizer = {
     }
   },
 
-  addSanitizeItem: function () {
+  addSanitizeItem: function() {
     if (typeof Sanitizer != 'function')
       return;
     // Sanitizer will execute this
     Sanitizer.prototype.items['extensions-tabmix'] = {
-      clear : function() {
+      clear: function() {
         try {
           let win = Tabmix.getTopWin();
           win.Tabmix.Sanitizer.sanitize();
         } catch (ex) {
-          try {Tabmix.reportError(ex);} catch(e) { }
+          try {Tabmix.reportError(ex);} catch (e) { }
         }
       },
       get canClear() {
@@ -34,7 +34,7 @@ Tabmix.setSanitizer = {
     };
   },
 
-  addMenuItem: function () {
+  addMenuItem: function() {
     var prefs = document.getElementsByTagName("preferences")[0];
     var _item;
     var itemList = document.getElementById("itemList");
@@ -92,7 +92,7 @@ Tabmix.setSanitizer = {
   },
 
   checked: false,
-  disableMenuItem: function () {
+  disableMenuItem: function() {
     let disabled = gSanitizePromptDialog.selectedTimespan !== Sanitizer.TIMESPAN_EVERYTHING;
     let checkbox = document.getElementById("extensions-tabmix");
     checkbox.setAttribute("disabled", disabled);
@@ -103,7 +103,7 @@ Tabmix.setSanitizer = {
     }
   },
 
-  confirm: function (aCheckbox) {
+  confirm: function(aCheckbox) {
     if (!aCheckbox.checked)
       return;
 
diff --git a/chrome/content/preferences/overlay/preferencesOverlay.js b/chrome/content/preferences/overlay/preferencesOverlay.js
index 6036d49..50dac1b 100644
--- a/chrome/content/preferences/overlay/preferencesOverlay.js
+++ b/chrome/content/preferences/overlay/preferencesOverlay.js
@@ -41,7 +41,7 @@ var gTabMix_preferencesOverlay = { // jshint ignore:line
   },
 
 /* ........ paneTabs .............. */
-   initPaneTabsOptions: function () {
+   initPaneTabsOptions: function() {
       this.id("_hideTabbar").value = this.id("extensions.tabmix.hideTabbar").value;
       this.id("generalWindowOpen").value = this.id("browser.link.open_newwindow").value;
       this.id("warnCloseMultiple").checked = this.id("extensions.tabmix.tabs.warnOnClose").value;
@@ -50,7 +50,7 @@ var gTabMix_preferencesOverlay = { // jshint ignore:line
       this.setSingleWindowUI();
    },
 
-   setSingleWindowUI: function () {
+   setSingleWindowUI: function() {
      var val = TabmixSvc.prefBranch.getBoolPref("singleWindow");
      let item = this.id("linkTargetWindow");
      item.disabled = val;
@@ -60,7 +60,7 @@ var gTabMix_preferencesOverlay = { // jshint ignore:line
        item.removeAttribute("style");
    },
 
-   showTabmixOptions: function (panel) {
+   showTabmixOptions: function(panel) {
       var windowMediator = Services.wm;
       var browserWindow = windowMediator.getMostRecentWindow('navigator:browser');
 
@@ -77,7 +77,7 @@ var gTabMix_preferencesOverlay = { // jshint ignore:line
    },
 
 /* ........ paneMain .............. */
-   initMainPane: function () {
+   initMainPane: function() {
      var menuList = this.id("browserStartupPage");
      var hBox = menuList.parentNode;
      menuList.parentNode.id = "whenBrowserStartBox";
@@ -85,8 +85,8 @@ var gTabMix_preferencesOverlay = { // jshint ignore:line
      this.onStartupPrefchanged();
    },
 
-   onStartupPrefchanged: function () {
-     var tabmixSession =  this.id('tabmix.sm').value || this.id('tabmix.cr').value;
+   onStartupPrefchanged: function() {
+     var tabmixSession = this.id('tabmix.sm').value || this.id('tabmix.cr').value;
      if (tabmixSession)
        this.id("whenBrowserStartBox").setAttribute("tabmixSession", true);
      else
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index 7539c2b..bdf441a 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -47,7 +47,7 @@ var gPrefWindow = { // jshint ignore:line
 
     // init buttons extra1, extra2, accept, cancel
     docElt.getButton("extra1").setAttribute("icon", "apply");
-    docElt.getButton("extra2").setAttribute("popup","tm-settings");
+    docElt.getButton("extra2").setAttribute("popup", "tm-settings");
     docElt.setAttribute("cancelbuttonlabel", docElt.mStrBundle.GetStringFromName("button-cancel"));
     this.setButtons(true);
 
@@ -184,7 +184,7 @@ var gPrefWindow = { // jshint ignore:line
     var broadcasters = $(paneID + ":Broadcaster");
     if (!broadcasters)
       return;
-    Array.forEach(broadcasters.childNodes, function (broadcaster) {
+    Array.forEach(broadcasters.childNodes, function(broadcaster) {
       let preference = $(broadcaster.id.replace("obs", "pref"));
       if (preference)
         this.updateBroadcaster(preference, broadcaster);
@@ -210,7 +210,7 @@ var gPrefWindow = { // jshint ignore:line
     if (item.hasAttribute("inverseDependency"))
       val = !val;
     // remove disabled when the value is false
-    Tabmix.setItem(item, "disabled" , val || null);
+    Tabmix.setItem(item, "disabled", val || null);
   },
 
   tabSelectionChanged: function(event) {
@@ -365,7 +365,7 @@ XPCOMUtils.defineLazyGetter(window, "gPreferenceList", function() {
   let prefs = Services.prefs.getDefaultBranch("");
   let tabmixPrefs = Services.prefs.getChildList("extensions.tabmix.").sort();
   // filter out preference without default value
-  tabmixPrefs = otherPrefs.concat(tabmixPrefs).filter(function(pref){
+  tabmixPrefs = otherPrefs.concat(tabmixPrefs).filter(function(pref) {
     try {
       return prefs["get" + PrefFn[prefs.getPrefType(pref)]](pref) !== undefined;
     } catch (ex) { }
@@ -426,7 +426,7 @@ function exportData() {
   }).then(null, Tabmix.reportError);
 }
 
-function importData () {
+function importData() {
   showFilePicker("open").then(file => {
     return file && OS.File.read(file.path);
   }).then((input) => {
@@ -464,8 +464,8 @@ function showFilePicker(mode) {
   });
 }
 
-function loadData (pattern) {
-  if (pattern[0]!="tabmixplus") {
+function loadData(pattern) {
+  if (pattern[0] != "tabmixplus") {
     //  Can not import because it is not a valid file.
     alert(TabmixSvc.getString("tmp.importPref.error1"));
     return;
@@ -493,13 +493,13 @@ function loadData (pattern) {
 
   var prefName, prefValue;
   Shortcuts.prefsChangedByTabmix = true;
-  for (let i = 1; i < pattern.length; i++){
+  for (let i = 1; i < pattern.length; i++) {
     let index = pattern[i].indexOf("=");
-    if (index > 0){
-      prefName  = pattern[i].substring(0,index);
+    if (index > 0) {
+      prefName = pattern[i].substring(0, index);
       if (SMinstalled && sessionPrefs.indexOf(prefName) > -1)
         continue;
-      prefValue = pattern[i].substring(index+1,pattern[i].length);
+      prefValue = pattern[i].substring(index + 1, pattern[i].length);
       setPrefByType(prefName, prefValue, true);
     }
   }
@@ -514,7 +514,7 @@ function loadData (pattern) {
 function showPane(paneID) {
   let docElt = document.documentElement;
   let paneToLoad = document.getElementById(paneID);
-  if(!paneToLoad || paneToLoad.nodeName != "prefpane")
+  if (!paneToLoad || paneToLoad.nodeName != "prefpane")
     paneToLoad = $(docElt.lastSelected);
   docElt.showPane(paneToLoad);
 }
@@ -551,7 +551,7 @@ function openHelp(helpTopic) {
 var gIncompatiblePane = {
   lastSelected: "paneLinks",
 
-  init: function (docElt) {
+  init: function(docElt) {
     this.paneButton = document.getAnonymousElementByAttribute(docElt, "pane", "paneIncompatible");
     let radioGroup = this.paneButton.parentNode;
     radioGroup.addEventListener("command", this, false);
@@ -563,7 +563,7 @@ var gIncompatiblePane = {
     radioGroup.removeEventListener("command", this, false);
   },
 
-  handleEvent: function (aEvent) {
+  handleEvent: function(aEvent) {
     if (aEvent.type != "command")
       return;
     let prefWindow = document.documentElement;
@@ -571,14 +571,14 @@ var gIncompatiblePane = {
       this.lastSelected = prefWindow.lastSelected;
   },
 
-  checkForIncompatible: function (aShowList) {
-     let tmp = { };
+  checkForIncompatible: function(aShowList) {
+     let tmp = {};
      Components.utils.import("resource://tabmixplus/extensions/CompatibilityCheck.jsm", tmp);
      tmp = new tmp.CompatibilityCheck(window, aShowList, true);
   },
 
   // call back function from CompatibilityCheck.jsm
-  hide_IncompatibleNotice: function (aHide, aFocus) {
+  hide_IncompatibleNotice: function(aHide, aFocus) {
     if (this.paneButton.collapsed != aHide) {
       this.paneButton.collapsed = aHide;
       $("paneIncompatible").collapsed = aHide;
diff --git a/chrome/content/preferences/session.js b/chrome/content/preferences/session.js
index 6331413..0713a2c 100644
--- a/chrome/content/preferences/session.js
+++ b/chrome/content/preferences/session.js
@@ -2,7 +2,7 @@
 
 var gSessionPane = {
   gSessionManager: null,
-  init: function () {
+  init: function() {
     if (TabmixSvc.isLinux)
       $("sessionManager-panels").setAttribute("linux", "true");
 
@@ -23,7 +23,7 @@ var gSessionPane = {
       gMenuPane.updateSessionShortcuts();
   },
 
-  isSessionStoreEnabled: function (onStart) {
+  isSessionStoreEnabled: function(onStart) {
     if (this.gSessionManager)
       return;
 
@@ -37,7 +37,7 @@ var gSessionPane = {
       $("session").selectedIndex = 0;
   },
 
-  setSessionsOptions: function (item) {
+  setSessionsOptions: function(item) {
     let instantApply = document.documentElement.instantApply;
     var useSessionManager = !item.checked;
     $("sesionsPanel").setAttribute("manager", useSessionManager ? "tabmix" : "firefox");
@@ -90,7 +90,7 @@ var gSessionPane = {
       gPrefWindow.setButtons(!gPrefWindow.changes.length);
   },
 
-  setSessionpath: function (val) {
+  setSessionpath: function(val) {
     var menuItem = $("onStart.popup").getElementsByAttribute("value", val)[0];
     $("pref_sessionpath").value = menuItem.getAttribute("session");
   },
@@ -106,7 +106,7 @@ var gSessionPane = {
     return sm && sm.gSessionManager || sm;
   },
 
-  setVisiblecontent: function (sessionManagerInstalled, onStart) {
+  setVisiblecontent: function(sessionManagerInstalled, onStart) {
     if (typeof sessionManagerInstalled != "boolean")
       return;
 
@@ -126,11 +126,11 @@ var gSessionPane = {
     }
   },
 
-  sessionManagerOptions: function () {
+  sessionManagerOptions: function() {
     this.sessionManagerAddon.openOptions();
   },
 
-  convertSession: function () {
+  convertSession: function() {
     var browserWindow = Tabmix.getTopWin();
     if ($("chooseFile").selectedItem.value == "0")
       browserWindow.TabmixConvertSession.selectFile(window);
diff --git a/chrome/content/preferences/shortcuts.js b/chrome/content/preferences/shortcuts.js
index 1e8cc3d..e19c16a 100644
--- a/chrome/content/preferences/shortcuts.js
+++ b/chrome/content/preferences/shortcuts.js
@@ -74,7 +74,7 @@ function _getKeyName(win, aKey) {
   gUnicodeConverter.charset = "UTF-8";
   try {
     id = gUnicodeConverter.ConvertToUnicode(id);
-  } catch(ex) { }
+  } catch (ex) { }
 
   let keyname = {
     action: Services.prefs.getIntPref("browser.backspace_action"),
@@ -110,7 +110,7 @@ function _getLabel(elm, attr, value) {
   return null;
 }
 
-function _getPath(elm){
+function _getPath(elm) {
   let names = [];
   while (elm && elm.localName && elm.localName != "toolbaritem" &&
          elm.localName != "popupset" && elm.id != "titlebar-content") {
diff --git a/chrome/content/preferences/subdialogs/pref-appearance.js b/chrome/content/preferences/subdialogs/pref-appearance.js
index 5a7bacc..c53cf4c 100644
--- a/chrome/content/preferences/subdialogs/pref-appearance.js
+++ b/chrome/content/preferences/subdialogs/pref-appearance.js
@@ -4,7 +4,7 @@ let $ = id => document.getElementById(id);
 
 let tabstyles = { // jshint ignore:line
   pref: "appearance_tab",
-  init: function () {
+  init: function() {
     $("stylestabs").selectedIndex = Tabmix.prefs.prefHasUserValue(this.pref) ?
         Tabmix.prefs.getIntPref(this.pref) : 0;
 
@@ -21,20 +21,20 @@ let tabstyles = { // jshint ignore:line
     extra.classList.add("text-link");
   },
 
-  save: function () {
+  save: function() {
     Tabmix.prefs.setIntPref(this.pref, $("stylestabs").selectedIndex);
     // store the pref immediately
     Services.prefs.savePrefFile(null);
   },
 
-  cancel: function () {
+  cancel: function() {
     Array.forEach($("stylespanels").childNodes, function(panel) {
       $(panel.id)._ondialogcancel();
     });
     this.save();
   },
 
-  openHelp: function () {
+  openHelp: function() {
     var subPage = ["Current_Tab", "Unloaded_tabs", "Unread_tabs", "Other_Tabs", "Progress_meter_on_tabs"];
     var index = $("AppearanceTabBox").selectedIndex;
     var win = window.opener || Tabmix.getTopWin();
@@ -44,7 +44,7 @@ let tabstyles = { // jshint ignore:line
       document.documentElement.getButton("help").disabled = true;
   },
 
-  toggleRGBvisibility: function () {
+  toggleRGBvisibility: function() {
     let doc = document.documentElement;
     let extra = doc.getButton("extra2");
     let item = $("hide-RGB");
diff --git a/chrome/content/preferences/subdialogs/pref-filetype.js b/chrome/content/preferences/subdialogs/pref-filetype.js
index eefde66..aad1c50 100644
--- a/chrome/content/preferences/subdialogs/pref-filetype.js
+++ b/chrome/content/preferences/subdialogs/pref-filetype.js
@@ -2,8 +2,7 @@
 
 var list, entry, edit, del, add;
 
-function Init()
-{
+function Init() {
    // set these once and refer to them later
    list = document.getElementById('filetypeList');
    entry = document.getElementById('filetypeEntry');
@@ -14,10 +13,9 @@ function Init()
    FillData();
 }
 
-function FillData()
-{
-   //remove all the item from the list
-   while(list.hasChildNodes()) {
+function FillData() {
+   // remove all the item from the list
+   while (list.hasChildNodes()) {
     list.removeChild(list.lastChild);
    }
 
@@ -44,8 +42,7 @@ function FillData()
    return true;
 }
 
-function Save()
-{
+function Save() {
    var filetype = [];
    for (var i = 0; i < list.getRowCount(); ++i)
       filetype.push(list.getItemAtIndex(i).getAttribute("label").trim());
@@ -58,8 +55,7 @@ function Save()
 }
 
 // sets the textbox to the currently selected item, if any
-function Select()
-{
+function Select() {
    setButtonDisable(add, true);
    setButtonDisable(edit, true);
 
@@ -72,20 +68,18 @@ function Select()
    return true;
 }
 
-function Add()
-{
+function Add() {
    // check for data in the textbox
    if (!entry.value) return false;
 
    list.appendItem(entry.value, entry.value.toLowerCase());
 
-   SelectItemAt(list.getRowCount()-1, true);
+   SelectItemAt(list.getRowCount() - 1, true);
    setButtonDisable(del, false);
    return true;
 }
 
-function Mod()
-{
+function Mod() {
    // check for data in the textbox
    if (!entry.value) return false;
 
@@ -102,40 +96,37 @@ function Mod()
    return true;
 }
 
-function Input()
-{
+function Input() {
    if (!entry.value) {
-      setButtonDisable(edit ,true);
-      setButtonDisable(add ,true);
+      setButtonDisable(edit, true);
+      setButtonDisable(add, true);
    } else {
       // chack if the input value is in the list
       var items = list.getElementsByAttribute("value", entry.value.toLowerCase());
       if (items.length > 0) {
          SelectItemAt(list.getIndexOfItem(items[0]), false);
-         setButtonDisable(edit ,true);
-         setButtonDisable(add ,true);
+         setButtonDisable(edit, true);
+         setButtonDisable(add, true);
       } else {
-         if (list.selectedItem) setButtonDisable(edit ,false);
-         setButtonDisable(add ,false);
+         if (list.selectedItem) setButtonDisable(edit, false);
+         setButtonDisable(add, false);
       }
    }
 }
 
-function Del()
-{
+function Del() {
    var item = list.selectedItem;
    if (!item) return;
    var index = list.getIndexOfItem(item);
    // if the list is not empty select next item or if we at the end the last item
    if (list.getRowCount() > 1)
-      SelectItemAt(index == list.getRowCount() - 1  ? index - 1 : index + 1, true);
+      SelectItemAt(index == list.getRowCount() - 1 ? index - 1 : index + 1, true);
    else
       entry.value = null;
    list.removeChild(item);
 }
 
-function Restore()
-{
+function Restore() {
    Save();
    var pref = "filetype";
    if (Tabmix.prefs.prefHasUserValue(pref))
@@ -144,17 +135,15 @@ function Restore()
 }
 
 // select new item and focus the list
-function SelectItemAt(index, focus)
-{
+function SelectItemAt(index, focus) {
    list.ensureIndexIsVisible(index);
    list.selectedIndex = index;
    if (focus) list.focus();
 }
 
-function setButtonDisable(button, set)
-{
+function setButtonDisable(button, set) {
    if (set) {
-      button.setAttribute("disabled",true);
+      button.setAttribute("disabled", true);
    } else {
       button.removeAttribute("disabled");
    }
diff --git a/chrome/content/session/promptservice.js b/chrome/content/session/promptservice.js
index 88e20eb..acc23b2 100644
--- a/chrome/content/session/promptservice.js
+++ b/chrome/content/session/promptservice.js
@@ -43,7 +43,7 @@
            window.opener.Tabmix.Sessions.createMenuForDialog(popup, dialogParams.GetInt(3));
          else
            window.opener.TabmixSessionManager.createMenuForDialog(popup, dialogParams.GetInt(3));
-         switch ( dialogParams.GetInt(3) ) {
+         switch (dialogParams.GetInt(3)) {
             case TMP_SELECT_CRASH: index = popup.childNodes.length - 1;
                break;
             case TMP_SHOW_CLOSED_WINDOW_LIST: index = 1; // 0 is menuseparator
@@ -70,7 +70,7 @@
       // display the textBox
       var textBox = document.getElementById("tm_textbox");
       if (gHideElmParam == TMP_SHOW_TEXTBOX) {
-         messageParent.lastChild.setAttribute("style","height:3em");
+         messageParent.lastChild.setAttribute("style", "height:3em");
          gSavedName = dialogParams.GetString(2).split("\n");
          textBox.value = gSavedName.shift();
          gOrigName = textBox.value.toLowerCase();
@@ -132,7 +132,7 @@
       // if we are not a modal use a callback function
       if (typeof window._callBackFunction == "function") {
         if (window.opener && !window.opener.closed) {
-          let returnData  = {button: dialogParams.GetInt(4),
+          let returnData = {button: dialogParams.GetInt(4),
                              checked: (dialogParams.GetInt(5) == TMP_CHECKBOX_CHECKED),
                              label: dialogParams.GetString(5),
                              value: dialogParams.GetInt(6)};
@@ -162,9 +162,9 @@
 
      // && is the magic sequence to embed an & in your label.
      aLabel = aLabel.replace(/\&\&/g, "&");
-     if (aIsLabelFlag) {    // Set text for <label> element
+     if (aIsLabelFlag) { // Set text for <label> element
        aNode.setAttribute("value", aLabel);
-     } else {    // Set text for other xul elements
+     } else { // Set text for other xul elements
        aNode.label = aLabel;
      }
 
@@ -191,13 +191,13 @@
       var cLabel = TabmixSvc.setLabel("sm.replaceStartup.button1");
 
       var description = document.getElementById("tm_info").lastChild.firstChild;
-      textBox.value = textBox.value.replace(/^[\s]+/g,"");
+      textBox.value = textBox.value.replace(/^[\s]+/g, "");
       var name = textBox.value.toLowerCase();
       var validName = 0;
       if (name === "") validName = 1;
       if (validName === 0) {
          for (var i = 0; i < gSavedName.length; i++) {
-            if (name == gSavedName[i].toLowerCase() && gSavedName[i] !== "" ) {
+            if (name == gSavedName[i].toLowerCase() && gSavedName[i] !== "") {
                if (dialogParams.GetInt(3) == TMP_DLG_RENAME) {
                   if (gOrigName != name) validName = 2;
                   continue;
@@ -208,15 +208,15 @@
             }
          }
       }
-      switch ( validName ) {
+      switch (validName) {
          case 0:
             if (btnOK.disabled) btnOK.disabled = false;
             if (btnOK.hidden) btnOK.hidden = false;
             if (!btnExt.hidden) {
                btnExt.hidden = true;
-               if (dialogParams.GetInt(3) == TMP_DLG_SAVE) setLabelForNode(btnCancel,gCancelLabel);
+               if (dialogParams.GetInt(3) == TMP_DLG_SAVE) setLabelForNode(btnCancel, gCancelLabel);
             }
-            description.replaceData(0,description.length, "");
+            description.replaceData(0, description.length, "");
             document.documentElement.defaultButton = "accept";
             break;
          case 1:
@@ -225,16 +225,16 @@
             if (!btnOK.disabled) btnOK.disabled = true;
             if (!btnExt.hidden) {
                btnExt.hidden = true;
-               if (dialogParams.GetInt(3) == TMP_DLG_SAVE) setLabelForNode(btnCancel,gCancelLabel);
+               if (dialogParams.GetInt(3) == TMP_DLG_SAVE) setLabelForNode(btnCancel, gCancelLabel);
             }
             document.documentElement.defaultButton = "cancel";
             break;
          case 3:
             if (!btnOK.hidden) btnOK.hidden = true;
             btnExt.hidden = false;
-            if (dialogParams.GetInt(3) == TMP_DLG_SAVE) setLabelForNode(btnCancel,cLabel);
+            if (dialogParams.GetInt(3) == TMP_DLG_SAVE) setLabelForNode(btnCancel, cLabel);
             document.documentElement.defaultButton = "cancel";
             break;
       }
-      description.replaceData(0,description.length, msg[validName]);
+      description.replaceData(0, description.length, msg[validName]);
    }
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index 249d297..b26f08f 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -21,7 +21,7 @@ Tabmix.NO_NEED_TO_REPLACE = -1;
  *  sanitize privte data by delete the files session.rdf session.old
  */
 Tabmix.Sanitizer = {
-   isSanitizeTMPwithoutPrompet: function (aOnExit) {
+   isSanitizeTMPwithoutPrompet: function(aOnExit) {
      /*
       * The behavior is:
       *   - Tools > Clear Recent History... - Always show the UI
@@ -40,7 +40,7 @@ Tabmix.Sanitizer = {
       return sanitizeTabmix;
    },
 
-   tryToSanitize: function (aOnExit) {
+   tryToSanitize: function(aOnExit) {
       if (this.isSanitizeTMPwithoutPrompet(aOnExit)) {
         this.sanitize();
         return true;
@@ -65,7 +65,7 @@ Tabmix.Sanitizer = {
 
       // init new DATASource for all open window
       var enumerator = Tabmix.windowEnumerator();
-      while ( enumerator.hasMoreElements() ) {
+      while (enumerator.hasMoreElements()) {
          let wnd = enumerator.getNext();
 
          // clear DATASource
@@ -96,16 +96,18 @@ Tabmix.Sanitizer = {
       TabmixSessionManager.notifyClosedWindowsChanged();
 
       // set flag for next start
-      Tabmix.prefs.setBoolPref("sessions.sanitized" , true);
+      Tabmix.prefs.setBoolPref("sessions.sanitized", true);
       TabmixSvc.sm.sanitized = true;
    },
 
-   clearDisk: function (aFile) {
+   clearDisk: function(aFile) {
       if (aFile.exists()) {
          try {
             aFile.remove(aFile.isDirectory());
          }
-         catch (ex) { dump(ex + "\n"); Tabmix.assert(ex);} // couldn't remove the file - what now?
+         catch (ex) {
+           dump(ex + "\n"); Tabmix.assert(ex);
+         } // couldn't remove the file - what now?
       }
    }
 
@@ -113,14 +115,14 @@ Tabmix.Sanitizer = {
 
 var TabmixSessionData = { // jshint ignore:line
    docShellItems: ["Images","Subframes","MetaRedirects","Plugins","Javascript"],
-   tabAttribute:  ["protected","locked"],
+   tabAttribute: ["protected","locked"],
 
    getTabProperties: function sData_getTabProperties(aTab, checkPref) {
       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++ ){
+      for (var j = 0; j < this.tabAttribute.length; j++) {
          temp = aTab.hasAttribute(this.tabAttribute[j]) ? aTab.getAttribute(this.tabAttribute[j]) : "false";
-         tabProperties += (temp=="true") ? "1" : "0";
+         tabProperties += (temp == "true") ? "1" : "0";
       }
       // if save.permissions is false we save all Permissions as on, so if we change this pref after session
       // was saved, the session will load with Permissions as on.
@@ -161,7 +163,7 @@ var TabmixSessionData = { // jshint ignore:line
 
       if ("colorfulTabs" in window) {
         try {
-          let ctreadonly = colorfulTabs.clrSession.getTabValue(aTab,"ctreadonly");
+          let ctreadonly = colorfulTabs.clrSession.getTabValue(aTab, "ctreadonly");
           if (ctreadonly)
             tabProperties += " ctreadonly=" + ctreadonly;
           let tabClr = colorfulTabs.clrSession.getTabValue(aTab, "tabClr");
@@ -356,7 +358,7 @@ var TabmixSessionManager = { // jshint ignore:line
 
       if (!this.isPrivateWindow && isFirstWindow) {
          // if this isn't delete on exit, we know next time that firefox crash
-         this.prefBranch.setBoolPref("crashed" , true); // we use this in setup.js;
+         this.prefBranch.setBoolPref("crashed", true); // we use this in setup.js;
          Services.prefs.savePrefFile(null); // store the pref immediately
          let path = this._rdfRoot + "/closedSession/thisSession";
          this.setLiteral(path, "status", "crash");
@@ -478,7 +480,7 @@ var TabmixSessionManager = { // jshint ignore:line
           Tabmix.Sanitizer.isSanitizeTMPwithoutPrompet(true))
          return resultData;
 
-      if ( this.enableManager ) {
+      if (this.enableManager) {
          var result = {button: this.prefBranch.getIntPref("onClose"), checked: this.saveClosedtabs};
          if (result.button == 1 && !askBeforSave)
             result.button = Tabmix.BUTTON_OK;
@@ -622,7 +624,7 @@ var TabmixSessionManager = { // jshint ignore:line
       var allPopups = enabled && !window.toolbar.visible;
       var wnd, enumerator;
       enumerator = Tabmix.windowEnumerator();
-      while ( allPopups && enumerator.hasMoreElements() ) {
+      while (allPopups && enumerator.hasMoreElements()) {
          wnd = enumerator.getNext();
          allPopups = !wnd.toolbar.visible;
       }
@@ -631,7 +633,7 @@ var TabmixSessionManager = { // jshint ignore:line
 
       if (result.canClose) {
          enumerator = Tabmix.windowEnumerator();
-         while ( enumerator.hasMoreElements() ) {
+         while (enumerator.hasMoreElements()) {
             wnd = enumerator.getNext();
             wnd.TabmixSessionManager.windowClosed = true;
          }
@@ -793,7 +795,7 @@ var TabmixSessionManager = { // jshint ignore:line
         this.restoreWindowArguments();
       }
       else if (gBrowser.mCurrentTab.loadOnStartup) {
-        for (var i = 0; i < gBrowser.tabs.length ; i++)
+        for (var i = 0; i < gBrowser.tabs.length; i++)
           delete gBrowser.tabs[i].loadOnStartup;
       }
       else if (window.toolbar.visible && gBrowser.isBlankNotBusyTab(gBrowser.mCurrentTab))
@@ -821,7 +823,7 @@ var TabmixSessionManager = { // jshint ignore:line
                    TabmixSvc.getSMString("sm.corrupted.msg1");
          var buttons = ["", TabmixSvc.setLabel("sm.button.continue")].join("\n");
          this.promptService([Tabmix.BUTTON_CANCEL, Tabmix.HIDE_MENUANDTEXT, Tabmix.HIDE_CHECKBOX],
-               [title, msg, "", "", buttons], window, function(){});
+               [title, msg, "", "", buttons], window, function() {});
          Tabmix.assert(e);
          file.moveTo(this.profileDir, "session.old");
          this.DATASource = this.RDFService.GetDataSourceBlocking(uri);
@@ -861,7 +863,7 @@ var TabmixSessionManager = { // jshint ignore:line
         'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
         'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
         'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
-        '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' ];
+        '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
 
       var id = "";
       for (var i = 0; i < 8; ++i) {
@@ -925,7 +927,10 @@ var TabmixSessionManager = { // jshint ignore:line
    wrapContainer: function SM_wrapContainer(path, prop) {
       var root = this.getResource(path, prop);
       var container = this.initContainer(root);
-if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n" + "prop " + prop); return "error"}
+      if (container == "error") {
+          Tabmix.log("wrapContainer error path " + path + "\n" + "prop " + prop);
+          return "error";
+      }
       return {
          Root: root,
          Container: container,
@@ -1068,7 +1073,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
      }
    },
 
-   QueryInterface: function _QueryInterface(aIID){
+   QueryInterface: function _QueryInterface(aIID) {
       if (aIID.equals(Components.interfaces.nsIObserver) ||
             aIID.equals(Components.interfaces.nsISupports) ||
             aIID.equals(Components.interfaces.nsISupportsWeakReference))
@@ -1076,16 +1081,16 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       throw Components.results.NS_NOINTERFACE;
    },
 
-   closeProtectedTabs: function(){
+   closeProtectedTabs: function() {
      var protectedTabs = gBrowser.tabContainer.getElementsByAttribute("protected", true);
-     for (var i = protectedTabs.length - 1 ; i >= 0; i--) {
+     for (var i = protectedTabs.length - 1; i >= 0; i--) {
        var tab = protectedTabs[i];
        tab.removeAttribute("protected");
        this.removeTab(tab);
      }
    },
 
-   savedPrefs: { },
+   savedPrefs: {},
    observe: function SM_observe(aSubject, aTopic, aData) {
       switch (aTopic) {
          case "quit-application-requested":
@@ -1130,7 +1135,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
                this.saveState();
             }
             let slef = this;
-            setTimeout(function(){
+            setTimeout(function() {
               TMP_ClosedTabs.setButtonDisableState();
               slef.toggleRecentlyClosedWindowsButton();
             }, 0);
@@ -1182,7 +1187,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
                   if (!this.prefBranch.getBoolPref("manager") && !this.prefBranch.getBoolPref("crashRecovery")) {
                     this.globalPrivateBrowsing = false;
                     var self = this;
-                    window.setTimeout(function () {
+                    window.setTimeout(function() {
                       TMP_ClosedTabs.setButtonDisableState();
                       self.toggleRecentlyClosedWindowsButton();
                     }, 100);
@@ -1190,8 +1195,8 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
                   }
                   TMP_ClosedTabs.removeAllClosedTabs(); // to be on the safe side...
                   this.removeSession(this.gThisWin, this.gSessionPath[0]);
-                  window.setTimeout(function () {TMP_ClosedTabs.setButtonDisableState(); }, 0);
-                  this.afterExitPrivateBrowsing = window.setTimeout(function (self) {
+                  window.setTimeout(function() {TMP_ClosedTabs.setButtonDisableState(); }, 0);
+                  this.afterExitPrivateBrowsing = window.setTimeout(function(self) {
                     self.globalPrivateBrowsing = false;
                     self.windowClosed = false;
                     self.onSessionRestored(true);
@@ -1200,7 +1205,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
                     self.saveStateDelayed();
                     self.updateClosedWindowsMenu("check");
                     self.afterExitPrivateBrowsing = null;
-                  },0, this);
+                  }, 0, this);
                   break;
             }
          break;
@@ -1301,10 +1306,10 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var title, msg, buttons;
       var areYouSure = TabmixSvc.getSMString("sm.areYouSure.msg");
       var chooseStartup = TabmixSvc.getSMString("sm.canChooseStartup.msg");
-      switch ( caller ) {
+      switch (caller) {
          case "addWinToSession":
             title = TabmixSvc.getSMString("sm.addtoStartup.title");
-            var msgType = caller=="addWinToSession" ? "windows" : "tabs";
+            var msgType = caller == "addWinToSession" ? "windows" : "tabs";
             msg = TabmixSvc.getSMString("sm.addtoStartup.msg." + msgType) + "\n" +
                   label + "\n" + areYouSure + "\n\n" + chooseStartup;
             buttons = [TabmixSvc.setLabel("sm.addtoStartup.button0"),
@@ -1400,7 +1405,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       }
    },
 
-   copySubtree: function (oldRoot, newRoot) {
+   copySubtree: function(oldRoot, newRoot) {
       var allElements = this.DATASource.GetAllResources();
       while (allElements.hasMoreElements()) {
          var aResource = allElements.getNext();
@@ -1415,7 +1420,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var sessionpath = !newPath ? "--" : this.prefBranch.getCharPref("onStart.sessionpath");
       this.prefBranch.setIntPref("onStart.loadsession", result.value);
       if (result.value > -1) {
-         if (result.label == sessionpath ) this.prefBranch.setCharPref("onStart.sessionpath", newPath);
+         if (result.label == sessionpath) this.prefBranch.setCharPref("onStart.sessionpath", newPath);
          else this.prefBranch.setCharPref("onStart.sessionpath", result.label);
       }
       Services.prefs.savePrefFile(null); // store the pref immediately
@@ -1434,7 +1439,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var newPath = this._rdfRoot + "/saved/" + id + "/window";
       if (action == "save") {
          // ask the user for new name or for exist name if the user want to replace
-         var session = this.getSessionName("save"+what);
+         var session = this.getSessionName("save" + what);
          if (session.button == Tabmix.BUTTON_CANCEL) return; // user cancel
          else if (session.button == Tabmix.BUTTON_EXTRA1) oldPath = session.path;
          name = session.name;
@@ -1450,13 +1455,13 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          if (result.button == Tabmix.BUTTON_CANCEL) return; // user cancel
          else if (result.button == Tabmix.BUTTON_OK) this.replaceStartupPref(result, newPath);
       }
-      var count = this.saveOneOrAll("save"+what, newPath, saveClosedTabs);
+      var count = this.saveOneOrAll("save" + what, newPath, saveClosedTabs);
       if (count) this.insertSession(count, name, newPath, oldPath);
       else Tabmix.log("Error in " + action + " " + what);
    },
 
    isValidtoSave: function() {
-      if ( !this.enableManager ) return false;
+      if (!this.enableManager) return false;
       if (!this.isWindowValidtoSave()) {
          var title = TabmixSvc.getSMString("sm.title");
          var msg = TabmixSvc.getSMString("sm.dontSaveBlank.msg");
@@ -1479,7 +1484,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       if (this.isPrivateWindow)
         return false;
       var numTabs, numWindows;
-      switch ( action ) {
+      switch (action) {
          case "savethiswindow":
                numTabs = this.saveOneWindow(path, "", false, saveClosedTabs);
                numWindows = 1;
@@ -1501,10 +1506,10 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var index = 0;
       if (oldPath !== "") index = container.IndexOf(this.RDFService.GetResource(oldPath));
       var node = this.RDFService.GetResource(path);
-      container.InsertElementAt(node, index+1, true);
+      container.InsertElementAt(node, index + 1, true);
       if (oldPath !== "") { // remove the session we replace
          container.RemoveElementAt(index, true);
-         this.removeSession(oldPath, this._rdfRoot+'/windows');
+         this.removeSession(oldPath, this._rdfRoot + '/windows');
       }
       this.setLiteral(node, "name", name);
       this.setLiteral(node, "nameExt", this.getNameData(count.win, count.tab));
@@ -1522,7 +1527,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var title = TabmixSvc.getSMString("sm.sessionName.title." + action);
       var label, buttons, actionFlag;
       var sessionList = this.getSessionList("saved");
-      if (action=="rename") {
+      if (action == "rename") {
          label = old;
          buttons = [TabmixSvc.setLabel("sm.sessionName.button0"),
                         TabmixSvc.setLabel("sm.sessionName.button1")].join("\n");
@@ -1531,7 +1536,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          label = action == "saveprevious" ? old : gBrowser.mCurrentTab.label;
          buttons = [TabmixSvc.setLabel("sm.askBeforSave.button0"),
                         TabmixSvc.setLabel("sm.askBeforSave.button1"),
-                        TabmixSvc.setLabel("sm.replaceStartup.button0")+"..."].join("\n");
+                        TabmixSvc.setLabel("sm.replaceStartup.button0") + "..."].join("\n");
          actionFlag = Tabmix.DLG_SAVE;
       }
       label = label + "\n" + sessionList.list.join("\n");
@@ -1541,7 +1546,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          case Tabmix.BUTTON_CANCEL: return {button: result.button};
          case Tabmix.BUTTON_OK:
          case Tabmix.BUTTON_EXTRA1 :
-            var trimResult = result.label.replace(/^[\s]+/g,"").replace(/[\s]+$/g,"");
+            var trimResult = result.label.replace(/^[\s]+/g, "").replace(/[\s]+$/g, "");
             return {button: result.button, name: encodeURI(trimResult),
                     path: sessionList.path[result.value], saveClosedTabs: result.checked};
       }
@@ -1568,16 +1573,16 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
 
    getNameData: function(numWindows, numTabs) {
       var d = new Date();
-      var date = [d.getFullYear(), '/', d.getMonth()<9 ? "0":"",
-                  d.getMonth()+1, '/', d.getDate()<10 ? "0":"", d.getDate()].join('');
-      var time = [d.getHours()<10 ? "0":"", d.getHours(), ':',
-                  d.getMinutes()<10 ? "0":"", d.getMinutes(), ':',
-                  d.getSeconds()<10 ? "0":"", d.getSeconds()].join('');
+      var date = [d.getFullYear(), '/', d.getMonth() < 9 ? "0" : "",
+                  d.getMonth() + 1, '/', d.getDate() < 10 ? "0" : "", d.getDate()].join('');
+      var time = [d.getHours() < 10 ? "0" : "", d.getHours(), ':',
+                  d.getMinutes() < 10 ? "0" : "", d.getMinutes(), ':',
+                  d.getSeconds() < 10 ? "0" : "", d.getSeconds()].join('');
       var empty = TabmixSvc.getSMString("sm.session.empty");
       var T = TabmixSvc.getSMString("sm.session.tabs");
       var W = TabmixSvc.getSMString("sm.session.windows");
       if (numWindows === 0) return ", (" + empty + ") (" + date + " " + time + ")";
-      else if (numWindows < 2) return ", (" + numTabs + " "+ T + ") (" + date + " " + time + ")";
+      else if (numWindows < 2) return ", (" + numTabs + " " + T + ") (" + date + " " + time + ")";
       return ", (" + numWindows + " " + W + ", " + numTabs + " " + T + ") (" + date + " " + time + ")";
    },
 
@@ -1587,13 +1592,13 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
         return false;
 
       var overwriteWindows = this.prefBranch.getBoolPref("restore.overwritewindows") || Tabmix.singleWindowMode;
-      document.getElementById("tm-sm-OpenInCurrenWindow").setAttribute("default",overwriteWindows);
-      document.getElementById("tm-sm-OpenInNewWindow").setAttribute("default",!overwriteWindows);
+      document.getElementById("tm-sm-OpenInCurrenWindow").setAttribute("default", overwriteWindows);
+      document.getElementById("tm-sm-OpenInNewWindow").setAttribute("default", !overwriteWindows);
       document.getElementById("tm-sm-OpenInNewWindow").hidden = Tabmix.singleWindowMode;
 
       var mValue = triggerNode.getAttribute("value");
       if (mValue <= -1)
-         document.getElementById("tm-sm-Rename").setAttribute("disabled",true);
+         document.getElementById("tm-sm-Rename").setAttribute("disabled", true);
       else
          document.getElementById("tm-sm-Rename").removeAttribute("disabled");
 
@@ -1607,7 +1612,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
             mItem.removeAttribute("checked");
       } else {
          mItem.removeAttribute("checked");
-         mItem.setAttribute("disabled",true);
+         mItem.setAttribute("disabled", true);
       }
 
       var mShowext = document.getElementById("tm-sm-showext");
@@ -1651,7 +1656,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       // call restoreSession after delay to let the popup menu time to hide
       window.setTimeout(function() {
         this.delayRestoreSession(node, overwriteWindows);
-      }.bind(this), 0 );
+      }.bind(this), 0);
    },
 
    delayRestoreSession: function(node, overwriteWindows) {
@@ -1692,7 +1697,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
 
    removeFromMenu: function(event, popup, root) {
       if (!Tabmix.prefs.getBoolPref("middleclickDelete")) return;
-      if ( event.button == 1 && ("session" in event.target)) {
+      if (event.button == 1 && ("session" in event.target)) {
          this.removeSavedSession(event.target);
          if (root == this.gSessionPath[0] && this.isClosedWindowsEmpty()) popup.hidePopup();
          else this.createMenu(popup, root);
@@ -1713,7 +1718,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
               this.replaceStartupPref(result, "");
               /* falls through */
             case Tabmix.NO_NEED_TO_REPLACE:
-              this.removeSession(path, this._rdfRoot+'/windows');
+              this.removeSession(path, this._rdfRoot + '/windows');
          }
       } else if (node.id.startsWith("tm-sm-closedwindows") || node.id == "btn_closedwindows") {
          this.removeSession(path, this.gSessionPath[0]);
@@ -1737,8 +1742,8 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
             this.deleteSubtree(this.gSessionPath[1]);
             this.deleteSubtree(this.gSessionPath[2]);
             this.deleteSubtree(this.gSessionPath[3]);
-            this.deleteSubtree(this._rdfRoot+'/saved');
-            this.deleteSubtree(this._rdfRoot+'/windows');
+            this.deleteSubtree(this._rdfRoot + '/saved');
+            this.deleteSubtree(this._rdfRoot + '/windows');
             this.saveStateDelayed();
             this.prefBranch.setIntPref("onStart.loadsession", -1);
             Services.prefs.savePrefFile(null); // store the pref immediately
@@ -1797,7 +1802,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var nodeToDelete = [];
       var noProp = typeof(prop) == "undefined";
       var valueExist = typeof(value) == "string";
-      while(containerEnum.hasMoreElements()) {
+      while (containerEnum.hasMoreElements()) {
          var node = containerEnum.getNext();
          var propExist = noProp ? true : this.nodeHasArc(node, prop);
          if (valueExist && !noProp && propExist && this.getLiteralValue(node, prop) != value) propExist = false;
@@ -1843,7 +1848,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
      popup_menu.id = menu.id + "_menu";
      menu.appendChild(popup_menu);
      popup_menu.childNodes[2].hidden = false;
-     this.createMenu(popup_menu, this._rdfRoot+'/windows');
+     this.createMenu(popup_menu, this._rdfRoot + '/windows');
    },
 
    createMenuForDialog: function(popup, contents) {
@@ -1852,7 +1857,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          this.createMenu(popup, window.opener.this.gSessionPath[0], contents);
       } else {
          // create saved Session popup menu
-         this.createMenu(popup, this._rdfRoot+'/windows', contents);
+         this.createMenu(popup, this._rdfRoot + '/windows', contents);
          // check if sessionpath and loadsessions valid for saved session
          var loadsession = this.prefBranch.getIntPref("onStart.loadsession");
          if (loadsession > -1 && contents != 1 && loadsession != popup.parentNode.sessionIndex) {
@@ -1902,7 +1907,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var sessionpath = this.prefBranch.getCharPref("onStart.sessionpath");
       var showTooltip = sessionmanagerMenu || onClosedWindowsList;
       var closedWinList = parentId.indexOf("closedwindows") != -1;
-      while(containerEnum.hasMoreElements()) {
+      while (containerEnum.hasMoreElements()) {
          node = containerEnum.getNext();
          if (this.nodeHasArc(node, "private") || this.nodeHasArc(node, "status") &&
                this.getLiteralValue(node, "status") != "saved") continue;
@@ -1931,7 +1936,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          mi.value = i;
          if (parentID != "onStart.loadsession") {
             index = closedWinList ? count - 1 - i : i;
-            accessKey = (index > 25) ? "" : String.fromCharCode(65 + index) + "  " ;
+            accessKey = (index > 25) ? "" : String.fromCharCode(65 + index) + "  ";
             mi.setAttribute("accesskey", accessKey);
             mi.setAttribute("label", accessKey + name + (showNameExt ? nameExt : ""));
             if (showTooltip) mi.setAttribute("tooltiptext", accessKey + name + nameExt);
@@ -1941,7 +1946,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          popup.insertBefore(mi, closedWinList ? popup.childNodes[1] : endSeparator);
       }
       var allEmpty = true;
-      switch ( parentID ) {
+      switch (parentID) {
          case "sessionmanagerMenu":
             var observer = document.getElementById("tmp_menu_AllWindows");
             var isOneWindow = Tabmix.isSingleBrowserWindow;
@@ -1959,9 +1964,9 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
 
             var menu;
             var empty = ", (" + TabmixSvc.getSMString("sm.session.empty") + ")";
-            for (i = 0; i < sessionLabel.length; i++ ){
+            for (i = 0; i < sessionLabel.length; i++) {
                menu = document.createElement("menuitem");
-               var [sLabel , sessionIndex] = sessionLabel[i].split(" ");
+               var [sLabel, sessionIndex] = sessionLabel[i].split(" ");
                menu.session = this.gSessionPath[sessionIndex];
                menu.command = menuCommand;
                if (this.containerEmpty(menu.session) && contents != 1)
@@ -1975,13 +1980,13 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
                menu.setAttribute("value", (-1 - i));
                if (TabmixSvc.isLinux && parentId == "tm-sessionmanager")
                   menu.addEventListener("command", restoreSession);
-               popup.appendChild (menu);
+               popup.appendChild(menu);
             }
             if (afterCrash && contents != 1) { // add separator before Crashed menu item
                menu = document.createElement("menuseparator");
                popup.insertBefore(menu, popup.lastChild);
             }
-            if (contents == 1) loadsession = -1; //set "Last Sessoin" as default in the list
+            if (contents == 1) loadsession = -1; // set "Last Sessoin" as default in the list
             this.setDefaultIndex(popup, loadsession, sessionpath);
             break;
          case "onStart.loadsession":
@@ -2003,7 +2008,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
    },
 
    // set defaultIndex, sessionIndex and default Attribute
-   setDefaultIndex : function(popup, loadsession, sessionpath) {
+   setDefaultIndex: function(popup, loadsession, sessionpath) {
       popup.parentNode.defaultIndex = -1; // index with menuseparator
       popup.parentNode.sessionIndex = -1; // index without menuseparator
       var i, item, value, checked;
@@ -2023,9 +2028,9 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
 
    // update disable/enable to closed window list in tool menu and toolbar
    updateClosedWindowsMenu: function(action) {
-      var disabled = (action == "check") ? this.isClosedWindowsEmpty(): action;
+      var disabled = (action == "check") ? this.isClosedWindowsEmpty() : action;
       var wnd, enumerator = Tabmix.windowEnumerator();
-      while ( enumerator.hasMoreElements() ) {
+      while (enumerator.hasMoreElements()) {
          wnd = enumerator.getNext();
          wnd.Tabmix.setItem("tmp_closedwindows", "disabled", disabled || null);
       }
@@ -2035,7 +2040,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       var node, disabled = true;
       var aContainer = this.initContainer(this.gSessionPath[0]);
       var containerEnum = aContainer.GetElements();
-      while(containerEnum.hasMoreElements()) {
+      while (containerEnum.hasMoreElements()) {
          node = containerEnum.getNext();
          if (this.getLiteralValue(node, "status") == "saved") {
             disabled = false;
@@ -2101,7 +2106,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          var closedWinList = this.initContainer(this.gSessionPath[0]).GetCount();
          var lastSession = this.containerEmpty(this.gSessionPath[1]); // last session
          var prevtoLast = this.containerEmpty(this.gSessionPath[2]); // previous to last
-         var savedSession = this.containerEmpty(this._rdfRoot+'/windows'); // saved session
+         var savedSession = this.containerEmpty(this._rdfRoot + '/windows'); // saved session
          var isAllEmpty = lastSession && prevtoLast && savedSession;
          var callBack = function(aResult) {
             this.afterCrashPromptCallBack(aResult);
@@ -2171,7 +2176,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
          this.prefBranch.setBoolPref("manager", true); // enable session manager
          try {
             Services.prefs.savePrefFile(null); // store the pref immediately
-         } catch(ex) { }
+         } catch (ex) { }
       }
       if (aResult.button == Tabmix.BUTTON_OK) {
          switch (this.callBackData.whattoLoad) {
@@ -2206,15 +2211,15 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       // swap 0 --> 1 --> 2 --> 0
       var i;
       var sessions = [], subTree, aSession;
-      for (i = 0; i < sessionType.length-1; i++) {
+      for (i = 0; i < sessionType.length - 1; i++) {
          sessions.push(this.getResource(path + sessionType[i], "session"));
       }
-      for (i = 0; i < sessionType.length-1; i++) {
+      for (i = 0; i < sessionType.length - 1; i++) {
          if (i === 0) { // delete oldest session subtree
-            aSession = sessions[sessionType.length-2];
+            aSession = sessions[sessionType.length - 2];
             subTree = aSession.QueryInterface(Ci.nsIRDFResource).Value;
             this.deleteSubtree(subTree);
-         } else aSession = sessions[i-1];
+         } else aSession = sessions[i - 1];
          this.setResource(path + sessionType[i], "session", aSession);
       }
       for (i = 0; i < sessionType.length; i++) {
@@ -2251,7 +2256,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
       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, savePref = false;
       var result = {}, title, msg = "", buttons;
       if (afterCrash)
          title = TabmixSvc.getSMString("sm.afterCrash.title");
@@ -2269,7 +2274,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
             if (afterCrash)
                msg += "\n\n" + TabmixSvc.getSMString("sm.start.msg1");
             buttons = ["", TabmixSvc.setLabel("sm.button.continue")].join("\n");
-            let callBack = function (aResult) {
+            let callBack = function(aResult) {
                this.enableCrashRecovery(aResult);
                this._sendRestoreCompletedNotifications(true);
             }.bind(this);
@@ -2283,7 +2288,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
 
       var sessionPath = sessionList.path;
       var loadSessionIsValid = true, sessionIndex, thisPath;
-      switch ( (loadSession > 0) ? 0 : loadSession ) {
+      switch ((loadSession > 0) ? 0 : loadSession) {
          case 0:
             sessionIndex = null;
             if (this.prefBranch.prefHasUserValue("onStart.sessionpath")) {
@@ -2321,7 +2326,7 @@ if (container == "error") { Tabmix.log("wrapContainer error path " + path + "\n"
             break;
       }
       if (restoreFlag > 0 || afterCrash || (startupEmpty && askifempty) || !loadSessionIsValid) {
-try{
+try {
          if (afterCrash)
             msg += TabmixSvc.getSMString("sm.afterCrash.msg0") + " " +
                    TabmixSvc.getSMString("sm.start.msg1");
@@ -2374,7 +2379,7 @@ try{
 
   // Add delay when calling prompt on startup
   promptService: function(intParam, strParam, aWindow, aCallBack) {
-    setTimeout(function(){
+    setTimeout(function() {
       Tabmix.promptService(intParam, strParam, aWindow, aCallBack);
     }, 0);
   },
@@ -2413,7 +2418,7 @@ try{
   * move all tabs & closed tabs into one window
   * (original code by Session Manager extension)
   */
-  mergeWindows: function(state){
+  mergeWindows: function(state) {
     if (state.windows.length < 2)
       return;
     // take off first window
@@ -2453,10 +2458,10 @@ try{
 
    getSessionList: function SM_getSessionList(flag) {
       var aList = [], sessionPath = [];
-      var aContainer = this.initContainer(this._rdfRoot+'/windows');
+      var aContainer = this.initContainer(this._rdfRoot + '/windows');
       var containerEnum = aContainer.GetElements();
       var node, aName;
-      while(containerEnum.hasMoreElements()) {
+      while (containerEnum.hasMoreElements()) {
          node = containerEnum.getNext();
          if (flag != "onlyPath") {
            aName = this.getDecodedLiteralValue(node, "name");
@@ -2487,8 +2492,8 @@ try{
 
    saveAllWindows: function SM_saveAllWindows(path, caller, saveClosedTabs) {
       var enumerator = Tabmix.windowEnumerator();
-      var wnd, savedTabs = 0 , savedWin = 0, thisWin;
-      while ( enumerator.hasMoreElements() ) {
+      var wnd, savedTabs = 0, savedWin = 0, thisWin;
+      while (enumerator.hasMoreElements()) {
          wnd = enumerator.getNext();
          if (this.isWindowPrivate(wnd))
            continue;
@@ -2512,7 +2517,7 @@ try{
          curTime = this.getLiteralValue(thisSession, "timestamp", 0);
       else {
          var pref = "warnAboutClosingTabs.timeout";
-         var delay = Tabmix.prefs.prefHasUserValue(pref) ? Tabmix.prefs.getCharPref(pref)*1 : 0;
+         var delay = Tabmix.prefs.prefHasUserValue(pref) ? Tabmix.prefs.getCharPref(pref) * 1 : 0;
          curTime = new Date().valueOf() - delay;
       }
       var windowEnum = container.GetElements();
@@ -2524,7 +2529,7 @@ try{
                this.setLiteral(rdfNodeLastWindow, "dontLoad", "true");
          }
       }
-      var count = this.countWinsAndTabs(container,  "dontLoad");
+      var count = this.countWinsAndTabs(container, "dontLoad");
       return count.win > 0 && count.tab > 0;
    },
 
@@ -2624,7 +2629,7 @@ try{
          this.setLiteral(rdfNodeThisWindow, "name", encodeURI(label));
          this.setLiteral(rdfNodeThisWindow, "nameExt", this.getNameData(-1, savedTabs));
          var pref = "warnAboutClosingTabs.timeout";
-         var delay = Tabmix.prefs.prefHasUserValue(pref) ? Tabmix.prefs.getCharPref(pref)*1 : 0;
+         var delay = Tabmix.prefs.prefHasUserValue(pref) ? Tabmix.prefs.getCharPref(pref) * 1 : 0;
          var newTime = new Date().valueOf() - delay;
          this.setLiteral(rdfNodeThisWindow, "timestamp", newTime);
          // if we overwrite window we don't load it again on restart
@@ -2824,14 +2829,14 @@ try{
    },
 
    saveAllTab: function SM_saveAllTab(winPath) {
-      var savedTabs = 0 ;
+      var savedTabs = 0;
       var rdfNodeTabs = this.getResource(winPath, "tabs");
       var rdfLabelTabs = rdfNodeTabs.QueryInterface(Ci.nsIRDFResource).Value;
       var tabContainer = this.initContainer(rdfNodeTabs);
       for (var i = 0; i < gBrowser.tabs.length; i++) {
          var aTab = gBrowser.tabs[i];
          if (this.saveTab(aTab, rdfLabelTabs, tabContainer, true))
-           savedTabs ++;
+           savedTabs++;
       }
       return savedTabs;
    },
@@ -2857,7 +2862,7 @@ try{
       var tabState;
       try {
          tabState = JSON.parse(TabmixSvc.ss.getTabState(aTab));
-      } catch(ex) {
+      } catch (ex) {
          if (!Tabmix.isVersion(280) && browser.userTypedValue == "about:config" && browser.__SS_data)
             tabState = browser.__SS_data;
       }
@@ -2892,12 +2897,12 @@ try{
    },
 
    saveTabData: function SM_saveTabData(aNode, aData) {
-      this.setIntLiteral(aNode, "index",      aData.index);
-      this.setIntLiteral(aNode, "tabPos",     aData.pos);
-      this.setLiteral   (aNode, "image",      aData.image || "");
-      this.setLiteral   (aNode, "properties", aData.properties);
-      this.setLiteral   (aNode, "history",    aData.history);
-      this.setLiteral   (aNode, "scroll",     aData.scroll);
+      this.setIntLiteral(aNode, "index", aData.index);
+      this.setIntLiteral(aNode, "tabPos", aData.pos);
+      this.setLiteral(aNode, "image", aData.image || "");
+      this.setLiteral(aNode, "properties", aData.properties);
+      this.setLiteral(aNode, "history", aData.history);
+      this.setLiteral(aNode, "scroll", aData.scroll);
       if (aData.closedAt)
          this.setLiteral(aNode, "closedAt", aData.closedAt);
    },
@@ -3049,7 +3054,7 @@ try{
                    sessionCount == 1 && saveBeforOverwrite && overwriteTabs) {
                  this.saveOneWindow(this.gSessionPath[0], "", true);
                }
-               var newCaller = (sessionCount != 1) ? caller+"-concatenate" : caller;
+               var newCaller = (sessionCount != 1) ? caller + "-concatenate" : caller;
                this.loadOneWindow(windowPath, newCaller);
             } else {
                let win = windowsList.pop();
@@ -3107,12 +3112,12 @@ try{
          features += aPrivate ? ",private" : ",non-private";
       var newWindow = window.openDialog("chrome://browser/content/browser.xul",
           "_blank", features, null);
-      newWindow.tabmixdata = { path: aPath, caller: aCaller };
+      newWindow.tabmixdata = {path: aPath, caller: aCaller};
    },
 
    loadOneWindow: function SM_loadOneWindow(path, caller) {
       var overwrite = true, restoreSelect = this.prefBranch.getBoolPref("save.selectedtab");
-      switch ( caller ) {
+      switch (caller) {
          case "firstwindowopen":
                overwrite = false;
                let hasFirstArgument = window.arguments && window.arguments[0];
@@ -3152,7 +3157,7 @@ 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"));
+         alert(TabmixSvc.getSMString("sm.restoreError.msg0") + "\n" + TabmixSvc.getSMString("sm.restoreError.msg1"));
          return;
       }
 
@@ -3184,7 +3189,7 @@ try{
       var newIndex, aTab, loadOnStartup = [];
       if (newtabsCount > 0 && overwrite) {
          // unpinned tabs reorder tabs, so we loob backward
-         for (let i = gBrowser.tabs.length - 1 ; i >= 0; i--) {
+         for (let i = gBrowser.tabs.length - 1; i >= 0; i--) {
            this.resetTab(gBrowser.tabs[i]);
          }
          while (newtabsCount > gBrowser.tabs.length) {
@@ -3205,7 +3210,7 @@ try{
          // catch blank tab for reuse
          var blankTabs = [], blankTabsCount = 0, currentTabIsBalnk = false;
          // unpinned tabs reorder tabs loob backward
-         for (let i = gBrowser.tabs.length - 1 ; i >= 0; i--) {
+         for (let i = gBrowser.tabs.length - 1; i >= 0; i--) {
             aTab = gBrowser.tabs[i];
             // make sure we not overwrite tab that loads from apps
             if (aTab.loadOnStartup) {
@@ -3259,7 +3264,7 @@ try{
          let needToMove = openTabNext && !concatenate;
          let newPos = needToMove ? cTab._tPos + 1 : lastIndex + 1;
          // move blank tabs to new position
-         for (let t = 0; t < blankTabs.length ; t++) {
+         for (let t = 0; t < blankTabs.length; t++) {
             blankTab = blankTabs[t];
             let tabPos = blankTab._tPos < newPos ? newPos - 1 : newPos;
             gBrowser.moveTabTo(blankTab, tabPos);
@@ -3290,8 +3295,8 @@ try{
                gBrowser.moveTabTo(cTab, newPos + lastSelectedIndex);
             }
             else
-              this.updateSelected(newPos + lastSelectedIndex, caller=="firstwindowopen" ||
-                                  caller=="windowopenedbytabmix");
+              this.updateSelected(newPos + lastSelectedIndex, caller == "firstwindowopen" ||
+                                  caller == "windowopenedbytabmix");
          }
          newIndex = newPos;
       }
@@ -3310,7 +3315,7 @@ try{
         activeGroupId = groups.activeGroupId;
       let tabs = [], numVisibleTabs = 0, firstVisibleTab = -1;
       let needToReload = this.prefBranch.getBoolPref("restore.reloadall");
-      for (let t = 0; t < tabsData.length ; t++) {
+      for (let t = 0; t < tabsData.length; t++) {
         let data = tabsData[t];
         let tab = gBrowser.tabs[newIndex + t];
         tabs.push(tab);
@@ -3371,7 +3376,7 @@ try{
 
       // when resuming at startup: add additionally requested pages to the end
       if (caller == "firstwindowopen" && loadOnStartup.length) {
-        let lastPlace = gBrowser.tabs.length-1;
+        let lastPlace = gBrowser.tabs.length - 1;
         Array.forEach(loadOnStartup, function(aTab) {
           gBrowser.moveTabTo(aTab, lastPlace);
         });
@@ -3384,7 +3389,7 @@ try{
          caller1 = window.tabmixdata.caller;
          delete window.tabmixdata;
       }
-      if (caller == "openclosedwindow" || caller1 == "openclosedwindow"){
+      if (caller == "openclosedwindow" || caller1 == "openclosedwindow") {
          if (this.nodeHasArc(rdfNodeWindow, "reOpened")) {
             this.removeSession(path, this.gSessionPath[0]);
             this.updateClosedWindowsMenu("check");
@@ -3406,7 +3411,7 @@ try{
       if (typeof this.tabsToLoad == "number" && --this.tabsToLoad === 0) {
          delete this.tabsToLoad;
          TabmixTabbar.updateBeforeAndAfter(); // just in case (we do it also in setTabTitle
-         if (this.enableBackup){
+         if (this.enableBackup) {
             var result = this.saveOneWindow(this.gSessionPath[0], "windowbackup");
             if (result > 0)
                this.saveStateDelayed(-1);
@@ -3532,7 +3537,7 @@ try{
       }
    },
 
-   copyClosedTabsToSessionStore: function (aPath, aOverwrite) {
+   copyClosedTabsToSessionStore: function(aPath, aOverwrite) {
       if (!this.saveClosedtabs)
         return;
       this.saveClosedTabs(aPath, this.gThisWin, "closedtabs");
@@ -3543,7 +3548,7 @@ try{
       if (Tabmix.isVersion(260))
         TabmixSvc.SessionStore._windows[window.__SSi]._closedTabs = closedTabsData;
       else {
-        let state = { windows: [{ _closedTabs: closedTabsData, selected: 0 }], _firstTabs: true};
+        let state = {windows: [{_closedTabs: closedTabsData, selected: 0}], _firstTabs: true};
         TabmixSvc.ss.setWindowState(window, TabmixSvc.JSON.stringify(state), false);
       }
       TMP_ClosedTabs.setButtonDisableState();
@@ -3590,7 +3595,7 @@ try{
       var _locked = TMP_SessionStore._getAttribute(tabState, "_locked") != "false" ? "1" : "0";
       data.properties = "0" + _locked;
       if ("disallow" in tabState && tabState.disallow) {
-         for (let j = 0; j < TabmixSessionData.docShellItems.length; j++ )
+         for (let j = 0; j < TabmixSessionData.docShellItems.length; j++)
             data.properties += tabState.disallow.indexOf(TabmixSessionData.docShellItems[j]) == -1 ? "1" : "0";
       }
       else {
@@ -3646,7 +3651,7 @@ try{
       this.saveStateDelayed();
    },
 
-   removeTab: function (aTab) {
+   removeTab: function(aTab) {
       // add blank tab before removing last tab to prevent browser closing with last tab
       // and the default replacing last tab option
       if (gBrowser.tabs.length == 1)
@@ -3671,7 +3676,7 @@ try{
       // "extensions.tabmix.sessions.max_backups";
       try {
         maxBackups = this.prefBranch.getIntPref("max_backups");
-      } catch(ex) { }
+      } catch (ex) { }
 
       this.archiveSessionsFile(maxBackups, false /* don't force */);
     }
@@ -3702,7 +3707,7 @@ try{
         backups.push(entry.leafName);
     }
 
-    if (backups.length ===  0)
+    if (backups.length === 0)
       return null;
 
     backups.sort();
@@ -3733,8 +3738,8 @@ try{
     // Use YYYY-MM-DD (ISO 8601) as it doesn't contain illegal characters
     // and makes the alphabetical order of multiple backup files more useful.
     var d = new Date();
-    var date = [d.getFullYear(), '-', d.getMonth()<9 ? "0":"", d.getMonth()+1, '-',
-                d.getDate()<10 ? "0":"", d.getDate()].join('');
+    var date = [d.getFullYear(), '-', d.getMonth() < 9 ? "0" : "", d.getMonth() + 1, '-',
+                d.getDate() < 10 ? "0" : "", d.getDate()].join('');
     var backupFilename = "tabmix_sessions-" + date + ".rdf";
     var backupFile = null;
     if (!aForceArchive) {
@@ -3810,7 +3815,7 @@ try{
   _aftertWindowStateReady: function() { },
   _saveTabviewData: function() { },
   _setTabviewTab: function() { },
-  _tabviewData: { },
+  _tabviewData: {},
 
   /* ............... DEPRECATED ............... */
 
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index fc29293..c9d60de 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -15,7 +15,7 @@ var TMP_SessionStore = { // jshint ignore:line
      try {
        TabmixSvc.ss.init(window);
        this._ssInited = true;
-     } catch(ex) {
+     } catch (ex) {
        dump("nsSessionStore could not be initialized: " + ex + "\n");
        Tabmix.assert(ex);
        return;
@@ -96,7 +96,7 @@ var TMP_SessionStore = { // jshint ignore:line
          });
 
          TabmixSvc.sm.persistTabAttributeSet = true;
-      } catch(ex) {
+      } catch (ex) {
          Tabmix.log("nsSessionStore could not add Attribute to persistTabAttribute: " + ex + "\n");
       }
    },
@@ -146,7 +146,7 @@ var TMP_SessionStore = { // jshint ignore:line
                case 1:
                   Services.prefs.setIntPref("extensions.sessionmanager.startup", 1);
                   break;
-               //default: nothing to do
+               // default: nothing to do
             }
             switch (Tabmix.prefs.getIntPref("sessions.onClose")) {
                case 0:
@@ -181,7 +181,7 @@ var TMP_SessionStore = { // jshint ignore:line
          let bundle = bunService.createBundle("chrome://global/locale/commonDialogs.properties");
          let buttons = [bundle.GetStringFromName("Yes"), bundle.GetStringFromName("No")].join("\n");
          let self = this;
-         let callBack = function (aResult) {
+         let callBack = function(aResult) {
             if ((msgNo == 1 && aResult.button == 1) || ((msgNo == 2 && aResult.button === 0))) {
               self.setSessionRestore(false);
               Services.prefs.setBoolPref(TMP_SS_MANAGER, TMP_manager_enabled);
@@ -212,7 +212,7 @@ var TMP_SessionStore = { // jshint ignore:line
       }
    },
 
-   isSessionStoreEnabled: function () {
+   isSessionStoreEnabled: function() {
      return Services.prefs.getIntPref("browser.startup.page") == 3 ||
             Services.prefs.getBoolPref("browser.sessionstore.resume_from_crash");
    },
@@ -221,7 +221,7 @@ var TMP_SessionStore = { // jshint ignore:line
    // we call this only one time on window load
    // and store the value in Tabmix.isWindowAfterSessionRestore
    // we call this from onContentLoaded before nsSessionStore run its onLoad
-   setAfterSessionRestored: function () {
+   setAfterSessionRestored: function() {
       let afterSessionRestore;
       if (!Tabmix.isFirstWindow)
          afterSessionRestore = false;
@@ -260,7 +260,7 @@ var TMP_SessionStore = { // jshint ignore:line
       }
    },
 
-   setSessionRestore: function (aEnable) {
+   setSessionRestore: function(aEnable) {
      if (!Tabmix.isVersion(200))
         Services.prefs.setBoolPref("browser.warnOnRestart", aEnable);
       Services.prefs.setBoolPref("browser.warnOnQuit", aEnable);
@@ -306,12 +306,12 @@ var TMP_SessionStore = { // jshint ignore:line
       // restore attributes from the legacy Firefox 2.0/3.0 format
       if (aTabData.xultab) {
          var xultab = aTabData.xultab.split(" ");
-         for ( var i= 0; i < xultab.length; i++ ){
+         for (var i = 0; i < xultab.length; i++) {
             if (/^([^\s=]+)=(.*)/.test(xultab[i]) && RegExp.$1 == attrib)
                return decodeURI(RegExp.$2);
          }
       }
-      return  "";
+      return "";
    }
 
 };
@@ -377,7 +377,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
          var url = this.getUrl(tabData);
          var title = this.getTitle(tabData, url);
          var _uri = makeURI(url);
-         if ( _uri.scheme == "about" && title === "" )
+         if (_uri.scheme == "about" && title === "")
             url = title = "about:blank";
          else try {
             url = _uri.scheme + ":\/\/" + _uri.hostPort + _uri.path;
@@ -387,10 +387,10 @@ var TMP_ClosedTabs = { // jshint ignore:line
          var label = title ? title : url;
          let count = "";
          if (ltr) {
-            count = (i<9 ? "  " : "") + (i + 1) + ": ";
-            if (i+1 < 10)
-               m.setAttribute("accesskey", i+1);
-            else if (i+1 == 10)
+            count = (i < 9 ? "  " : "") + (i + 1) + ": ";
+            if (i + 1 < 10)
+               m.setAttribute("accesskey", i + 1);
+            else if (i + 1 == 10)
                m.setAttribute("accesskey", 0);
          }
          m.setAttribute("label", count + label);
@@ -501,7 +501,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
       Tabmix.setNumberOfTabsClosedLast(1);
    },
 
-   removeAllClosedTabs: function () {
+   removeAllClosedTabs: function() {
       // update our session data
       var updateRDF = TabmixSessionManager.enableBackup && Tabmix.prefs.getBoolPref("sessions.save.closedtabs");
       if (updateRDF)
@@ -544,7 +544,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
 
       // catch blank tabs
       var blankTabs = [];
-      for (let i = 0; i < gBrowser.tabs.length ; i++) {
+      for (let i = 0; i < gBrowser.tabs.length; i++) {
          if (gBrowser.isBlankNotBusyTab(gBrowser.tabs[i]))
             blankTabs.push(gBrowser.tabs[i]);
       }
@@ -556,7 +556,7 @@ var TMP_ClosedTabs = { // jshint ignore:line
       }
 
       // remove unused blank tabs
-      while(blankTabs.length > 0){
+      while (blankTabs.length > 0) {
          let blankTab = blankTabs.pop();
          blankTab.collapsed = true;
          gBrowser.removeTab(blankTab);
@@ -659,14 +659,14 @@ var TabmixConvertSession = { // jshint ignore:line
       if (!sessions)
          return;
 
-      if(TabmixSessionManager.nodeHasArc("rdf:gSessionManager", "status"))
+      if (TabmixSessionManager.nodeHasArc("rdf:gSessionManager", "status"))
          return;
 
       TabmixSessionManager.setLiteral("rdf:gSessionManager", "status", "converted");
       TabmixSessionManager.saveStateDelayed();
-      var callBack = function (aResult) {
+      var callBack = function(aResult) {
                   if (aResult.button == Tabmix.BUTTON_OK) {
-                    setTimeout(function (a,b) {
+                    setTimeout(function(a, b) {
                       TabmixConvertSession.convertFile(a, b);
                     }, 50, null, true);
                   }
@@ -683,7 +683,7 @@ var TabmixConvertSession = { // jshint ignore:line
       }.bind(this);
 
       fp.init(aWindow, this.getString("selectfile"), nsIFilePicker.modeOpen);
-      fp.defaultString="session.rdf";
+      fp.defaultString = "session.rdf";
       fp.appendFilter(this.getString("rdffiles"), "*.rdf");
       fp.appendFilter(this.getString("sessionfiles"), "*session*.*");
       fp.appendFilters(nsIFilePicker.filterText | nsIFilePicker.filterAll);
@@ -730,11 +730,11 @@ var TabmixConvertSession = { // jshint ignore:line
             }
          }
       }
-      return { windows: _windows, tabsCount: tabsCount };
+      return {windows: _windows, tabsCount: tabsCount};
    },
 
    getWindowState: function cs_getWindowState(rdfNodeWindow) {
-      var state = { tabs: [], selected: 0, _closedTabs: [] };
+      var state = {tabs: [], selected: 0, _closedTabs: []};
 
       var rdfNodeTabs = TabmixSessionManager.getResource(rdfNodeWindow, "tabs");
       if (!(rdfNodeTabs instanceof Ci.nsIRDFResource) || TabmixSessionManager.containerEmpty(rdfNodeTabs)) {
@@ -785,8 +785,8 @@ var TabmixConvertSession = { // jshint ignore:line
             tabsData.push(new _tabData(rdfNodeTab));
          }
       }
-      tabsData.sort(function (a, b) {return a - b;});
-      for (let i = 0; i < tabsData.length ; i++) {
+      tabsData.sort(function(a, b) {return a - b;});
+      for (let i = 0; i < tabsData.length; i++) {
          let tab = this.getTabState(tabsData[i].node, false, internal);
          if (tab)
             _tabs.push(tab);
@@ -818,7 +818,7 @@ var TabmixConvertSession = { // jshint ignore:line
    },
 
    getTabState: function cs_getTabState(rdfNodeTab, aClosedTab, internal) {
-      var tabData = {entries:[], index: 0, zoom: 1, disallow:"", text:""};
+      var tabData = {entries: [], index: 0, zoom: 1, disallow: "", text: ""};
       tabData.entries = this.getHistoryState(rdfNodeTab);
       if (!tabData.entries.length)
         return null;
@@ -844,7 +844,7 @@ var TabmixConvertSession = { // jshint ignore:line
       var tabProperties = properties.substr(0, booleanAttrLength);
       var disallow = [];
       for (let j = 0; j < tabAttribute.length; j++) {
-         if (tabProperties.charAt(j+2) != "1")
+         if (tabProperties.charAt(j + 2) != "1")
             disallow.push(tabAttribute[j]);
       }
       tabData.disallow = disallow.join(",");
@@ -929,10 +929,10 @@ var TabmixConvertSession = { // jshint ignore:line
       let newFormat = tmpData.indexOf(sep) == -1;
       tmpData = decodeData(tmpData, newFormat);
       var historyData = tmpData.split(sep);
-      var historyCount = historyData.length/3;
+      var historyCount = historyData.length / 3;
       var entries = [];
       for (let i = 0; i < historyCount; i++) {
-         let entry = { url:"", children:[], ID: 0};
+         let entry = {url: "", children: [], ID: 0};
          let index = i * 3;
          entry.url = historyData[index + 1];
          if (!entry.url)
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index deace69..3080882 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -3,7 +3,7 @@
 // code based on Tab X 0.5 enhanced version by Morac, modified by Hemiola SUN, later CPU & onemen
 var TabmixTabbar = {
   visibleRows: 1,
-  _windowStyle: {exist:false, value:null},
+  _windowStyle: {exist: false, value: null},
   _heights: [],
   _rowHeight: null,
   hideMode: 0,
@@ -160,7 +160,7 @@ var TabmixTabbar = {
     else
       this.updateScrollStatus();
 
-    window.setTimeout( function TMP_updateSettings_adjustScroll(_currentVisible) {
+    window.setTimeout(function TMP_updateSettings_adjustScroll(_currentVisible) {
         if (_currentVisible)
           gBrowser.ensureTabIsVisible(gBrowser.selectedTab);
         self.updateBeforeAndAfter();
@@ -248,7 +248,7 @@ var TabmixTabbar = {
 
     var newHeight, fillRowsHeights;
     if (typeof(this._heights[tabsPosition]) == "undefined") {
-      this._heights[tabsPosition] = { };
+      this._heights[tabsPosition] = {};
       fillRowsHeights = true;
     }
     if (aRows in this._heights[tabsPosition])
@@ -258,7 +258,7 @@ var TabmixTabbar = {
         let height = Tabmix.tabsUtils.tabstripInnerbox.getBoundingClientRect().height;
         if (tabBar.getAttribute("multibar") == "scrollbar") {
           // We can get here if we switch to diffrent tabs position while in multibar
-          let rowHeight = height/Tabmix.tabsUtils.lastTabRowNumber;
+          let rowHeight = height / Tabmix.tabsUtils.lastTabRowNumber;
           newHeight = rowHeight * aRows;
         }
         else
@@ -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;
@@ -282,23 +282,23 @@ var TabmixTabbar = {
   setHeightByPixels: function TMP_setHeightByPixels(newHeight) {
     var tabBar = gBrowser.tabContainer;
     var tabstrip = tabBar.mTabstrip._scrollbox;
-    tabstrip.style.setProperty("max-height",newHeight + "px", "important");
-    tabstrip.style.setProperty("height",newHeight + "px", "important");
+    tabstrip.style.setProperty("max-height", newHeight + "px", "important");
+    tabstrip.style.setProperty("height", newHeight + "px", "important");
     let tabsBottom = document.getAnonymousElementByAttribute(tabBar, "class", "tabs-bottom");
     let tabsBottomHeight = tabsBottom && tabBar.getAttribute("classic") != "v3Linux" ? tabsBottom.boxObject.height : 0;
     let newTabbarHeight = newHeight + tabsBottomHeight;
     let tabsToolbar = document.getElementById("TabsToolbar");
     if (TabmixSvc.isMac && !Tabmix.isVersion(280)) {
-      tabsToolbar.style.setProperty("height",newTabbarHeight + "px", "important");
+      tabsToolbar.style.setProperty("height", newTabbarHeight + "px", "important");
     }
     // override fixed height set by theme to .tabbrowser-tabs class
     if (tabBar.boxObject.height < newTabbarHeight || tabBar.style.getPropertyValue("height")) {
-      tabBar.style.setProperty("max-height",newTabbarHeight + "px", "important");
-      tabBar.style.setProperty("height",newTabbarHeight + "px", "important");
+      tabBar.style.setProperty("max-height", newTabbarHeight + "px", "important");
+      tabBar.style.setProperty("height", newTabbarHeight + "px", "important");
     }
     if (tabsToolbar.boxObject.height < newTabbarHeight || tabsToolbar.style.getPropertyValue("height")) {
-      tabsToolbar.style.setProperty("max-height",newTabbarHeight + "px", "important");
-      tabsToolbar.style.setProperty("height",newTabbarHeight + "px", "important");
+      tabsToolbar.style.setProperty("max-height", newTabbarHeight + "px", "important");
+      tabsToolbar.style.setProperty("height", newTabbarHeight + "px", "important");
     }
 
     // experimental - for theme that put tababr above the menus
@@ -352,11 +352,11 @@ var TabmixTabbar = {
         Tabmix.tabsUtils.updateVerticalTabStrip();
 
       if (this.position == 1)
-        setTimeout(function(){Tabmix.tabsUtils.updateVerticalTabStrip();},0);
+        setTimeout(function() {Tabmix.tabsUtils.updateVerticalTabStrip();}, 0);
 
       this.updateBeforeAndAfter();
     }
-    ///maybe we cad add this to the popupshing / or as css rule ?
+    /// maybe we cad add this to the popupshing / or as css rule ?
     Tabmix.setItem("alltabs-popup", "position",
         (window.windowState != window.STATE_MAXIMIZED || this.position == 1) ? "start_before" : "after_end");
   },
@@ -490,28 +490,28 @@ var TabmixTabbar = {
     // Just in case we missed something in the above code............
     var i, j;
     i = j = tabs[0]._tPos;
-    if ( tabs[j] && tabs[j].getAttribute("selected") == "true" )
+    if (tabs[j] && tabs[j].getAttribute("selected") == "true")
       j++;
     while (this.inSameRow(tabs.item(i), tabs.item(j)))
       i++;
 
-    if ( !tabs[i] ) // only one row
-      if ( tabs[j] )
+    if (!tabs[i]) // only one row
+      if (tabs[j])
         return tabs[j].boxObject.height;
       else
         return tabs[0].boxObject.height;
 
-    if ( tabs[i].getAttribute("selected") == "true" )
+    if (tabs[i].getAttribute("selected") == "true")
       i++;
-    if ( !tabs[i] )
-      return tabs[i-1].boxObject.height;
+    if (!tabs[i])
+      return tabs[i - 1].boxObject.height;
 
     this._rowHeight[tabsPosition] = tabs[i].baseY - tabs[j].baseY;
     return this._rowHeight[tabsPosition];
   },
 
   inSameRow: function TMP_inSameRow(tab1, tab2) {
-    if ( !tab1 || !tab2 )
+    if (!tab1 || !tab2)
       return false;
 
     var topY = Tabmix.tabsUtils.topTabY;
@@ -590,10 +590,10 @@ Tabmix.tabsUtils = {
     var tabbrowser = this.tabBar.tabbrowser;
     let tab = this.tabBar.firstChild;
 
-    XPCOMUtils.defineLazyGetter(Tabmix, "rtl", function () {
+    XPCOMUtils.defineLazyGetter(Tabmix, "rtl", function() {
       return window.getComputedStyle(tabbrowser, null).direction == "rtl";
     });
-    XPCOMUtils.defineLazyGetter(Tabmix, "ltr", function () {return !Tabmix.rtl;});
+    XPCOMUtils.defineLazyGetter(Tabmix, "ltr", function() {return !Tabmix.rtl;});
 
     // don't set button to left side if it is not inside tab-content
     let button = document.getAnonymousElementByAttribute(tab, "anonid", "tmp-close-button") ||
@@ -981,7 +981,7 @@ Tabmix.tabsUtils = {
     height += marginTop + marginBottom;
 
     var tabBottom = top - marginTop + height;
-    return Math.round((tabBottom - aTop)/height);
+    return Math.round((tabBottom - aTop) / height);
   },
 
   get canScrollTabsLeft() {
@@ -1067,7 +1067,7 @@ Tabmix.tabsUtils = {
 Tabmix.visibleTabs = {
   get first() {
     var tabs = gBrowser.tabs;
-    for (let i = 0; i < tabs.length; i++){
+    for (let i = 0; i < tabs.length; i++) {
       let tab = tabs[i];
       if (!tab.hidden && !tab.closing)
         return tab;
@@ -1079,7 +1079,7 @@ Tabmix.visibleTabs = {
     // we only need the last visible tab,
     // find it directly instead of using gBrowser.tabContainer.visibleTabs
     var tabs = gBrowser.tabs;
-    for (let i = tabs.length - 1; i >= 0; i--){
+    for (let i = tabs.length - 1; i >= 0; i--) {
       let tab = tabs[i];
       if (!tab.hidden && !tab.closing)
         return tab;
@@ -1087,7 +1087,7 @@ Tabmix.visibleTabs = {
     return gBrowser.selectedTab;
   },
 
-  previous: function (aTab) {
+  previous: function(aTab) {
     var tabs = gBrowser.visibleTabs;
     var index = tabs.indexOf(aTab);
     if (--index > -1)
@@ -1095,7 +1095,7 @@ Tabmix.visibleTabs = {
     return null;
   },
 
-  next: function (aTab) {
+  next: function(aTab) {
     var tabs = gBrowser.visibleTabs;
     var index = tabs.indexOf(aTab);
     if (index > -1 && ++index < tabs.length)
@@ -1103,7 +1103,7 @@ Tabmix.visibleTabs = {
     return null;
   },
 
-  indexOf: function (aTab) {
+  indexOf: function(aTab) {
     if (aTab)
       return gBrowser.visibleTabs.indexOf(aTab);
     return -1;
@@ -1134,7 +1134,7 @@ var gTMPprefObserver = {
       for (var i = 0; i < this.OBSERVING.length; ++i)
         Services.prefs.addObserver(this.OBSERVING[i], this, false);
     }
-    catch(e) {
+    catch (e) {
       Tabmix.log("prefs-Observer failed to attach:" + "\n" + e);
       Tabmix.prefs.setBoolPref("PrefObserver.error", true);
     }
@@ -1169,9 +1169,9 @@ 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
+      return; // ..and don't continue
     }
 
     var prefValue, value;
@@ -1287,7 +1287,7 @@ var gTMPprefObserver = {
         if (typeof this._tabWidthChanged == "undefined") {
           let self = this;
           this._tabWidthChanged = true;
-          [50, 100, 250, 500].forEach(function (timeout) {
+          [50, 100, 250, 500].forEach(function(timeout) {
             setTimeout(function TMP_tabWidthChanged() {
               if (currentVisible)
                 gBrowser.ensureTabIsVisible(gBrowser.selectedTab);
@@ -1506,7 +1506,7 @@ var gTMPprefObserver = {
         gBrowser.tabContainer.moveTabOnDragging = Services.prefs.getBoolPref(prefName);
         break;
       case "layout.css.devPixelsPerPx":
-        setTimeout(function(self) {self.setBgMiddleMargin();},0, this);
+        setTimeout(function(self) {self.setBgMiddleMargin();}, 0, this);
         break;
       case "extensions.tabmix.showTabContextMenuOnTabbar":
         TabmixContext.updateTabbarContextMenu(Services.prefs.getBoolPref(prefName));
@@ -1649,7 +1649,7 @@ var gTMPprefObserver = {
                      '.tabbrowser-tab:not([pinned]):not([faviconized="true"]):not([isPermaTab="true"])' +
                      ':not([protected]) .tab-close-button {' +
                      '-moz-margin-start: 0px !important;' +
-                     '-moz-margin-end: %Spx !important;}'.replace("%S", - icon.getBoundingClientRect().width);
+                     '-moz-margin-end: %Spx !important;}'.replace("%S", -icon.getBoundingClientRect().width);
     icon.style.removeProperty("display");
     this.insertRule(iconMargin);
 
@@ -1741,7 +1741,7 @@ var gTMPprefObserver = {
               '-moz-image-region: #REGION;}';
     let url = "chrome://browser/skin/Toolbar.png", region;
     let skin = Services.prefs.getCharPref("general.skins.selectedSkin");
-    if (skin=="classic/1.0") {
+    if (skin == "classic/1.0") {
       if (TabmixSvc.isLinux)
         region = TabmixSvc.australis ? "rect(0px, 360px, 18px, 342px)" :
                                        "rect(0px, 96px, 24px, 72px)";
@@ -1781,7 +1781,7 @@ var gTMPprefObserver = {
                   ":not([pinned]) {min-width: #1px !important; max-width: #2px !important;}";
     let _max = Services.prefs.getIntPref("browser.tabs.tabMaxWidth");
     let _min = Services.prefs.getIntPref("browser.tabs.tabMinWidth");
-    newRule = newRule.replace("#1" ,_min).replace("#2" ,_max);
+    newRule = newRule.replace("#1", _min).replace("#2", _max);
     this.insertRule(newRule, "width");
 
     // rule for controling moz-margin-start when we have pinned tab in multi-row
@@ -1853,7 +1853,7 @@ var gTMPprefObserver = {
     }
   },
 
-  setProgressMeter: function () {
+  setProgressMeter: function() {
     var showOnTabs = Tabmix.prefs.getBoolPref("progressMeter");
     var attribValue = null;
     if (showOnTabs)
@@ -1871,7 +1871,7 @@ var gTMPprefObserver = {
         var prefValue = Services.prefs.getIntPref(pref);
         test = test ? prefValue == testVal : prefValue != testVal;
       }
-      catch(e){ test = true; }
+      catch (e) { test = true; }
 
       if (test)
         Services.prefs.setIntPref(pref, newVal);
@@ -2085,7 +2085,7 @@ var gTMPprefObserver = {
       this.setTabsOnTop(TabmixTabbar.position == 1);
 
     if (TabmixTabbar.position === 0) {// top
-      this._bottomRect = {top:null, width:null, height:null};
+      this._bottomRect = {top: null, width: null, height: null};
       let bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
       bottomToolbox.style.removeProperty("height");
       tabsToolbar.style.removeProperty("top");
@@ -2120,7 +2120,7 @@ var gTMPprefObserver = {
     }
   },
 
-  _bottomRect: {top:null, width:null, height:null},
+  _bottomRect: {top: null, width: null, height: null},
   updateTabbarBottomPosition: function TMP_PO_updateTabbarBottomPosition(aEvent) {
     if (TabmixTabbar.position != 1 || !gBrowser.tabContainer.visible)
       return;
@@ -2168,7 +2168,7 @@ var gTMPprefObserver = {
     Tabmix.setItem("urlbar-go-button", "context", show ? "autoreload_popup" : null);
 
     let setContext = function(command) {
-      let items = document.getElementsByAttribute("command" ,"Browser:" + command);
+      let items = document.getElementsByAttribute("command", "Browser:" + command);
       Array.slice(items).forEach(function(item) {
         if (item.localName == "toolbarbutton")
           Tabmix.setItem(item, "context", show ? "autoreload_popup" : null);
@@ -2205,7 +2205,7 @@ var gTMPprefObserver = {
     // remove disp=attd&view=att it's make problem with gMail
     if (Tabmix.prefs.prefHasUserValue("filetype")) {
        var filetype = Tabmix.prefs.getCharPref("filetype");
-       filetype = filetype.replace("/disp=attd&view=att/","").replace("  ", " ").trim();
+       filetype = filetype.replace("/disp=attd&view=att/", "").replace("  ", " ").trim();
        Tabmix.prefs.setCharPref("filetype", filetype);
     }
     // 2008-08-17
@@ -2473,7 +2473,7 @@ try {
           b.selectedTab = b.addTab("http://tmp.garyr.net/version_update2.htm?version=" +
                                    currentVersion + defaultChanged);
           b.selectedTab.loadOnStartup = true;
-        },1000);
+        }, 1000);
         // noting more to do at the moment
       }
     };
@@ -2559,7 +2559,7 @@ var TabmixProgressListener = {
       }, true);
     },
 
-    onProgressChange: function (aBrowser, aWebProgress, aRequest,
+    onProgressChange: function(aBrowser, aWebProgress, aRequest,
                                 aCurSelfProgress, aMaxSelfProgress,
                                 aCurTotalProgress, aMaxTotalProgress) {
       if (!this.showProgressOnTab || TabmixTabbar.hideMode == 2 || !aMaxTotalProgress)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 4809669..7193cb1 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -13,9 +13,9 @@ Tabmix.startup = function TMP_startup() {
   // When in single window mode allow one normal window and one private window.
   // otherwise open new tab in most recent window of the appropriate type
   if (this.isVersion(200)) {
-    this._openNewTab = function (aPrivate) {
+    this._openNewTab = function(aPrivate) {
       if (this.singleWindowMode) {
-        let win = this.RecentWindow.getMostRecentBrowserWindow({ private: aPrivate });
+        let win = this.RecentWindow.getMostRecentBrowserWindow({private: aPrivate});
         if (win) {
           win.focus();
           win.BrowserOpenTab();
@@ -26,11 +26,11 @@ Tabmix.startup = function TMP_startup() {
     };
     let command = document.getElementById("Tools:PrivateBrowsing");
     let originalCode = command.getAttribute("oncommand");
-    Tabmix.setItem(command, "oncommand","if (Tabmix._openNewTab(true)) {" + originalCode + "}");
-    Tabmix.setItem(cmdNewWindow, "oncommand","if (Tabmix._openNewTab(false)) {" + originalNewNavigator + "}");
+    Tabmix.setItem(command, "oncommand", "if (Tabmix._openNewTab(true)) {" + originalCode + "}");
+    Tabmix.setItem(cmdNewWindow, "oncommand", "if (Tabmix._openNewTab(false)) {" + originalNewNavigator + "}");
   }
   else
-    Tabmix.setItem(cmdNewWindow, "oncommand","if (Tabmix.singleWindowMode) BrowserOpenTab(); " +
+    Tabmix.setItem(cmdNewWindow, "oncommand", "if (Tabmix.singleWindowMode) BrowserOpenTab(); " +
                                           "else {" + originalNewNavigator + "}");
 
   TabmixContext.toggleEventListener(true);
@@ -187,7 +187,7 @@ Tabmix.delayedStartup = function TMP_delayedStartup() {
   // get bookmark itemId and url - for use in getBookmarkTitle
   if ("bookMarkIds" in window) {
     let items = (window.bookMarkIds + "").split("|");
-    for (let i = 0; i < items.length ; i++) {
+    for (let i = 0; i < items.length; i++) {
       if (items[i] && items[i] > -1)
         gBrowser.tabs[i].setAttribute("tabmix_bookmarkId", items[i]);
     }
@@ -245,7 +245,7 @@ Tabmix.delayedStartup = function TMP_delayedStartup() {
     let buttons = [{
       label: "Disable Debug Mode",
       accessKey: "D",
-      callback: function () {
+      callback: function() {
         Tabmix.prefs.setBoolPref("enableDebug", false);
       }
     }];
@@ -508,7 +508,7 @@ var TMP_eventListener = {
       tabBar.setAttribute("tabmix_australis", Tabmix.extensions.treeStyleTab ? "tst" : "true");
 
     var skin = Services.prefs.getCharPref("general.skins.selectedSkin");
-    if (skin=="classic/1.0") {
+    if (skin == "classic/1.0") {
       if (TabmixSvc.isMac)
         tabBar.setAttribute("classic", "v4Mac");
       else if (TabmixSvc.isLinux) {
@@ -534,7 +534,7 @@ var TMP_eventListener = {
       var themes = /^(iPoxRemix|Ie8fox|Vfox3)/;
       if (themes.test(skin)) {
         // add backgroundrepeat Attribute for theme for use in multi-row
-        tabBar.setAttribute("backgroundrepeat" , true);
+        tabBar.setAttribute("backgroundrepeat", true);
       }
       switch (skin) {
         case "Australis":
@@ -542,31 +542,31 @@ var TMP_eventListener = {
           break;
         case "cfxe": // Chromifox Extreme
         case "cfxec":
-          tabBar.setAttribute("tabmix_skin" , "cfxec");
+          tabBar.setAttribute("tabmix_skin", "cfxec");
           break;
         case "Vfox3":
         case "phoenityaura": // Phoenity Aura
-          tabBar.setAttribute("tabmix_skin" , skin);
+          tabBar.setAttribute("tabmix_skin", skin);
           break;
         case "CrystalFox_Qute-BigRedBrent":
-          tabBar.setAttribute("tabmix_skin" , "CrystalFox");
+          tabBar.setAttribute("tabmix_skin", "CrystalFox");
           break;
         case "Vista-aero":
           let rightBox = document.getElementById("myTabBarRightBox");
           if (rightBox)
-            rightBox.setAttribute("vista_aero" , true);
+            rightBox.setAttribute("vista_aero", true);
           break;
         case "classiccompact":
-          tabBar.setAttribute("tabmix_skin" , "classiccompact");
+          tabBar.setAttribute("tabmix_skin", "classiccompact");
           break;
         case "BlackFox_V1-Blue":
-          tabBar.setAttribute("tabmix_skin" , "BlackFox");
+          tabBar.setAttribute("tabmix_skin", "BlackFox");
           break;
       }
     }
 
     // don't remove maybe some themes use this with Tabmix
-    tabBar.setAttribute("tabmix_firefox3" , true);
+    tabBar.setAttribute("tabmix_firefox3", true);
 
     if (Tabmix.singleWindowMode)
       gTMPprefObserver.setSingleWindowUI();
@@ -632,7 +632,7 @@ var TMP_eventListener = {
   },
 
   tabWidthCache: new WeakMap(),
-  onTabAttrModified: function (aEvent) {
+  onTabAttrModified: function(aEvent) {
     if (!TabmixTabbar.widthFitTitle)
       return;
 
@@ -653,7 +653,7 @@ var TMP_eventListener = {
     this.tabWidthCache.set(tab, width);
 
     TabmixTabbar.updateScrollStatus();
-    setTimeout(function(){TabmixTabbar.updateScrollStatus();}, 2500);
+    setTimeout(function() {TabmixTabbar.updateScrollStatus();}, 2500);
   },
 
   onSSTabRestoring: function TMP_EL_onSSTabRestoring(aEvent) {
@@ -774,7 +774,7 @@ var TMP_eventListener = {
     }
   },
 
-  updateMultiRow: function (aReset) {
+  updateMultiRow: function(aReset) {
     if (aReset)
       Tabmix.tabsNewtabButton = null;
     if (TabmixTabbar.isMultiRow) {
@@ -813,7 +813,7 @@ var TMP_eventListener = {
       let self = this;
       let timeout = Tabmix.tabsUtils.disAllowNewtabbutton &&
           Services.prefs.getBoolPref("browser.tabs.animate") ? 0 : 200;
-      this._onOpenTimeout = window.setTimeout( function TMP_onOpenTimeout(tab) {
+      this._onOpenTimeout = window.setTimeout(function TMP_onOpenTimeout(tab) {
         if (self._onOpenTimeout) {
           clearTimeout(self._onOpenTimeout);
           self._onOpenTimeout = null;
@@ -918,7 +918,7 @@ var TMP_eventListener = {
       Tabmix.tabsUtils.adjustNewtabButtonvisibility();
     if (TabmixTabbar.isMultiRow && tabBar.hasAttribute("multibar")) {
       _updateTabstrip();
-      setTimeout(function(){_updateTabstrip();}, 0);
+      setTimeout(function() {_updateTabstrip();}, 0);
     }
   },
 
@@ -1070,7 +1070,7 @@ var TMP_eventListener = {
           if (aID != "tabmixopt")
             win.close();
           else
-            win.setTimeout(function(){win.close();},0);
+            win.setTimeout(function() {win.close();}, 0);
         }
       });
     }
@@ -1123,9 +1123,9 @@ var TMP_eventListener = {
   // some theme not useing up to date Tabmix tab binding
   // we check here that all of our attribute exist
   setTabAttribute: function TMP_EL_setTabAttribute(aTab) {
-    let reloadIcon  = document.getAnonymousElementByAttribute(aTab, "class", "tab-reload-icon");
+    let reloadIcon = document.getAnonymousElementByAttribute(aTab, "class", "tab-reload-icon");
     if (!reloadIcon) {
-      let lockIcon  = document.getAnonymousElementByAttribute(aTab, "class", "tab-lock-icon");
+      let lockIcon = document.getAnonymousElementByAttribute(aTab, "class", "tab-lock-icon");
       if (lockIcon) {
         let XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
         let image = document.createElementNS(XULNS, "image");
@@ -1150,12 +1150,12 @@ var TMP_eventListener = {
  * initialized yet
  */
 Tabmix.initialization = {
-  init:                    {id: 0, obj: "Tabmix.tabsUtils"},
-  beforeStartup:           {id: 1, obj: "Tabmix"},
-  onContentLoaded:         {id: 2, obj: "TMP_eventListener"},
+  init: {id: 0, obj: "Tabmix.tabsUtils"},
+  beforeStartup: {id: 1, obj: "Tabmix"},
+  onContentLoaded: {id: 2, obj: "TMP_eventListener"},
   beforeBrowserInitOnLoad: {id: 3, obj: "Tabmix"},
-  onWindowOpen:            {id: 4, obj: "TMP_eventListener"},
-  delayedStartup:          {id: 5, obj: "Tabmix"},
+  onWindowOpen: {id: 4, obj: "TMP_eventListener"},
+  delayedStartup: {id: 5, obj: "Tabmix"},
 
   get isValidWindow() {
     /**
@@ -1167,7 +1167,7 @@ Tabmix.initialization = {
     let stopInitialization = false;
     Tabmix.singleWindowMode = Tabmix.prefs.getBoolPref("singleWindow");
     if (Tabmix.singleWindowMode) {
-      let tmp = { };
+      let tmp = {};
       Components.utils.import("resource://tabmixplus/SingleWindowModeUtils.jsm", tmp);
       stopInitialization = tmp.SingleWindowModeUtils.newWindow(window);
     }
diff --git a/chrome/content/utils.js b/chrome/content/utils.js
index 9f77d8e..e879b0e 100644
--- a/chrome/content/utils.js
+++ b/chrome/content/utils.js
@@ -83,8 +83,8 @@ var Tabmix = { // jshint ignore:line
       this[aModule + "Initialized"] = false;
     var self = this;
     XPCOMUtils.defineLazyGetter(aObject, aName, function() {
-      let tmp = { };
-      Components.utils.import("resource://tabmixplus/"+aModule+".jsm", tmp);
+      let tmp = {};
+      Components.utils.import("resource://tabmixplus/" + aModule + ".jsm", tmp);
       let Obj = tmp[aSymbol];
       if ("prototype" in tmp[aSymbol])
         Obj = new Obj();
@@ -102,7 +102,7 @@ var Tabmix = { // jshint ignore:line
 
     var self = this;
     Object.defineProperty(aObject, aOldName, {
-      get: function () {
+      get: function() {
         self.informAboutChangeInTabmix(aOldName, aNewName);
         delete aObject[aOldName];
         return (aObject[aOldName] = self.getObject(window, aNewName));
@@ -124,7 +124,7 @@ var Tabmix = { // jshint ignore:line
       this.clog(err.message + "\n\n" + extensionName + "extension call " + aOldName +
                  " from:\n" + "file: " + "chrome:" + path + "\nline: " + line +
                  "\n\nPlease inform Tabmix Plus developer" +
-                 (extensionName ? ( " and " + extensionName + "developer.") : "."));
+                 (extensionName ? (" and " + extensionName + "developer.") : "."));
     }
     else
       this.clog(err.message + "\n\n" + stack);
@@ -161,8 +161,8 @@ var Tabmix = { // jshint ignore:line
 
     // we add dependent to features to make this dialog float over the window on start
     var dialog = Services.ww.openWindow(aWindow,
-           "chrome://tabmixplus/content/session/promptservice.xul","","centerscreen" +
-           (modal ? ",modal" : ",dependent") ,dpb);
+           "chrome://tabmixplus/content/session/promptservice.xul", "", "centerscreen" +
+           (modal ? ",modal" : ",dependent"), dpb);
     if (!modal)
       dialog._callBackFunction = aCallBack;
 
diff --git a/defaults/preferences/tabmix.js b/defaults/preferences/tabmix.js
index e6aabca..ac911cc 100644
--- a/defaults/preferences/tabmix.js
+++ b/defaults/preferences/tabmix.js
@@ -94,8 +94,8 @@ pref("extensions.tabmix.progressMeter", true);
 
 pref("extensions.tabmix.styles.currentTab", '{"italic":false,"bold":false,"underline":false,"text":true,"textColor":"rgba(0,0,0,1)","bg":false,"bgColor":"rgba(236,233,216,1)","bgTopColor":"rgba(236,233,216,1)"}');
 pref("extensions.tabmix.styles.unloadedTab", '{"italic":true,"bold":false,"underline":false,"text":true,"textColor":"rgba(204,0,0,1)","bg":true,"bgColor":"rgba(236,233,216,1)","bgTopColor":"rgba(236,233,216,1)"}');
-pref("extensions.tabmix.styles.unreadTab",  '{"italic":true,"bold":false,"underline":false,"text":true,"textColor":"rgba(204,0,0,1)","bg":false,"bgColor":"rgba(236,233,216,1)","bgTopColor":"rgba(236,233,216,1)"}');
-pref("extensions.tabmix.styles.otherTab",   '{"italic":false,"bold":false,"underline":false,"text":true,"textColor":"rgba(0,0,0,1)","bg":false,"bgColor":"rgba(236,233,216,1)","bgTopColor":"rgba(236,233,216,1)"}');
+pref("extensions.tabmix.styles.unreadTab", '{"italic":true,"bold":false,"underline":false,"text":true,"textColor":"rgba(204,0,0,1)","bg":false,"bgColor":"rgba(236,233,216,1)","bgTopColor":"rgba(236,233,216,1)"}');
+pref("extensions.tabmix.styles.otherTab", '{"italic":false,"bold":false,"underline":false,"text":true,"textColor":"rgba(0,0,0,1)","bg":false,"bgColor":"rgba(236,233,216,1)","bgTopColor":"rgba(236,233,216,1)"}');
 pref("extensions.tabmix.styles.progressMeter", '{"bg":true,"bgColor":"rgba(170,170,255,1)"}');
 
 pref("extensions.tabmix.flexTabs", false);
@@ -149,7 +149,7 @@ we replace extensions.tabmix.lasttab.handleCtrlTab
 with firefox pref
 pref("browser.ctrlTab.previews", true);
  */
-//pref("extensions.tabmix.lasttab.handleCtrlTab", true);
+// pref("extensions.tabmix.lasttab.handleCtrlTab", true);
 pref("extensions.tabmix.lasttab.tabPreviews", true); // Firefox 3.1+
 pref("extensions.tabmix.lasttab.respondToMouseInTabList", true);
 pref("extensions.tabmix.lasttab.showTabList", false);
@@ -160,7 +160,7 @@ pref("extensions.tabmix.undoClose", true);
 /*
  * we use browser.sessionstore.max_tabs_undo from 2008-02-26
  */
-//pref("extensions.tabmix.undoCloseCache", 5);
+// pref("extensions.tabmix.undoCloseCache", 5);
 pref("extensions.tabmix.undoClosePosition", true);
 pref("extensions.tabmix.undoCloseButton.menuonly", false);
 
@@ -226,8 +226,8 @@ pref("extensions.tabmix.hideIcons", false);
 pref("extensions.tabmix.reloadEvery.onReloadButton", false);
 
 // session manager pref
-pref("extensions.tabmix.sessionToolsMenu",true);
-pref("extensions.tabmix.closedWinToolsMenu",false);
+pref("extensions.tabmix.sessionToolsMenu", true);
+pref("extensions.tabmix.closedWinToolsMenu", false);
 
 pref("extensions.tabmix.sessions.crashRecovery", true);
 pref("extensions.tabmix.sessions.manager", true);
@@ -250,7 +250,7 @@ pref("extensions.tabmix.sessions.onStart.askifempty", true);
 pref("extensions.tabmix.sessions.onStart.loadsession", -1);
 pref("extensions.tabmix.sessions.onStart.sessionpath", "");
 pref("extensions.tabmix.sessions.onStart.restorePinned", true);
-//pref("extensions.tabmix.sessions.version", ""); removed on 2013-02-05 - not in use
+// pref("extensions.tabmix.sessions.version", ""); removed on 2013-02-05 - not in use
 
 pref("extensions.tabmix.autoReloadContent", true);
 pref("extensions.tabmix.autoReloadMenu", false);
diff --git a/modules/AsyncUtils.jsm b/modules/AsyncUtils.jsm
index 3d1649c..5c25184 100644
--- a/modules/AsyncUtils.jsm
+++ b/modules/AsyncUtils.jsm
@@ -14,7 +14,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TabmixSvc",
                                   "resource://tabmixplus/Services.jsm");
 this.AsyncUtils = {
   /* PromiseUtils.defer exsit since Firefox 39 */
-  defer : function() {
+  defer: function() {
     return new Deferred();
   },
 
@@ -36,7 +36,7 @@ this.AsyncUtils = {
 
       try {
         fn.apply(thisArg, args);
-      } catch(ex) {
+      } catch (ex) {
         deferred.reject(ex);
       }
       return deferred.promise;
diff --git a/modules/AutoReload.jsm b/modules/AutoReload.jsm
index 62bddb7..ebb18a8 100644
--- a/modules/AutoReload.jsm
+++ b/modules/AutoReload.jsm
@@ -30,7 +30,7 @@ this.AutoReload = {
     win.Tabmix.setItem(aPopup, "onpopuphidden", "this._tab = null;");
     win.Tabmix.setItem(aPopup, "oncommand",
                         "Tabmix.autoReload.setTime(this._tab, event.originalTarget.value);event.stopPropagation();");
-    for (let i=0; i<popup.childNodes.length; i++)
+    for (let i = 0; i < popup.childNodes.length; i++)
       aPopup.appendChild(popup.childNodes[i].cloneNode(true));
     if (parent.id != "reload-button") {
       aPopup.childNodes[0].hidden = true;
@@ -46,7 +46,7 @@ this.AutoReload = {
       aTab = this._currentTab(aTab);
 
     // populate the menu on the first popupShowing
-    if (!aPopup.id  && !aPopup.inited)
+    if (!aPopup.id && !aPopup.inited)
       this.addClonePopup(aPopup, aTab);
     aPopup._tab = aTab;
 
@@ -56,7 +56,7 @@ this.AutoReload = {
     var enableItem = menuItems[2];
     if (!this._labels) {
       this._labels = {
-        minute:  enableItem.getAttribute("minute"),
+        minute: enableItem.getAttribute("minute"),
         minutes: enableItem.getAttribute("minutes"),
         seconds: enableItem.getAttribute("seconds")
       };
@@ -66,8 +66,8 @@ this.AutoReload = {
 
     this.updateCustomList(aPopup);
 
-    var radio = aPopup.getElementsByAttribute("value" , "*");
-    for (let i=0; i<radio.length; i++) {
+    var radio = aPopup.getElementsByAttribute("value", "*");
+    for (let i = 0; i < radio.length; i++) {
       _setItem(radio[i], "checked", radio[i].value == aPopup._tab.autoReloadTime || null);
     }
   },
@@ -91,10 +91,10 @@ this.AutoReload = {
       let defaultList = ["30","60","120","300","900","1800"];
       list = list.filter(val => defaultList.indexOf(val) == -1);
       let newList = [];
-      list.forEach(function(val){
+      list.forEach(function(val) {
         if (parseInt(val) && newList.indexOf(val) == -1)
           newList.push(val);
-        if (newList.length > 6 )
+        if (newList.length > 6)
           newList.shift();
       });
       prefs.setCharPref(pref, newList);
@@ -116,7 +116,7 @@ this.AutoReload = {
     if (aSeconds > 59) {
       let minutes = parseInt(aSeconds / 60);
       timeLabel += minutes + " " + (this._labels[minutes > 1 ? "minutes" : "minute"]);
-      aSeconds -= 60*minutes;
+      aSeconds -= 60 * minutes;
       if (aSeconds)
         timeLabel += " ";
     }
@@ -133,7 +133,7 @@ this.AutoReload = {
     this._enable(aTab);
   },
 
-  setCustomTime : function(aTab) {
+  setCustomTime: function(aTab) {
     if (aTab.localName != "tab")
       aTab = this._currentTab(aTab);
     let result = {ok: false};
@@ -147,7 +147,7 @@ this.AutoReload = {
 
   enableAllTabs: function(aTabBrowser) {
     var tabs = aTabBrowser.visibleTabs;
-    for(let i=0; i<tabs.length; i++) {
+    for (let i = 0; i < tabs.length; i++) {
       let tab = tabs[i];
       if (tab.autoReloadEnabled === undefined)
         this.initTab(tab);
@@ -159,7 +159,7 @@ this.AutoReload = {
 
   disableAllTabs: function(aTabBrowser) {
     var tabs = aTabBrowser.visibleTabs;
-    for(let i=0; i<tabs.length; i++) {
+    for (let i = 0; i < tabs.length; i++) {
       let tab = tabs[i];
       if (tab.autoReloadEnabled)
         this._disable(tab);
@@ -188,7 +188,7 @@ this.AutoReload = {
     aTab.autoReloadURI = url;
     var win = aTab.ownerDocument.defaultView;
     _clearTimeout(aTab, win);
-    aTab.autoReloadTimerID = win.setTimeout(_reloadTab, aTab.autoReloadTime*1000, aTab);
+    aTab.autoReloadTimerID = win.setTimeout(_reloadTab, aTab.autoReloadTime * 1000, aTab);
     this._update(aTab, aTab.autoReloadURI + " " + aTab.autoReloadTime);
   },
 
@@ -246,7 +246,7 @@ this.AutoReload = {
       if (!aTab.autoReloadEnabled)
         aTab.autoReloadEnabled = true;
 
-      aTab.autoReloadTimerID = win.setTimeout(_reloadTab, aTab.autoReloadTime*1000, aTab);
+      aTab.autoReloadTimerID = win.setTimeout(_reloadTab, aTab.autoReloadTime * 1000, aTab);
     }
     else if (aTab.autoReloadEnabled)
       aTab.autoReloadEnabled = false;
@@ -280,13 +280,13 @@ this.AutoReload = {
   }
 };
 
-function _setItem () {}
+function _setItem() {}
 
 function _reloadTab(aTab) {
   if (!aTab || !aTab.parentNode)
     return;
 
-  if (aTab.autoReloadEnabled === false ) {
+  if (aTab.autoReloadEnabled === false) {
     aTab.postDataAcceptedByUser = false;
     return;
   }
@@ -347,11 +347,11 @@ function doReloadTab(window, browser, data) {
                           .getInterface(Ci.nsIDOMWindowUtils);
 
   browser.messageManager.sendAsyncMessage("Browser:Reload",
-      { flags: loadFlags,
-        handlingUserInput: windowUtils.isHandlingUserInput });
+      {flags: loadFlags,
+        handlingUserInput: windowUtils.isHandlingUserInput});
 }
 
-function  _observe(aSubject, aTopic) {
+function _observe(aSubject, aTopic) {
   if (aTopic == "common-dialog-loaded") {
     Services.obs.removeObserver(_observe, "common-dialog-loaded");
     let icon = aSubject.document.getElementById("info.icon");
@@ -360,7 +360,7 @@ function  _observe(aSubject, aTopic) {
   }
 }
 
-function  _clearTimeout(aTab, aWindow) {
+function _clearTimeout(aTab, aWindow) {
   if (aTab.autoReloadTimerID) {
     if (!aWindow)
       aWindow = aTab.ownerDocument.defaultView;
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index a8eddeb..fb348c6 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -58,7 +58,7 @@ this.TabmixContentClick = {
 };
 Object.freeze(TabmixContentClick);
 
-let Tabmix = { };
+let Tabmix = {};
 
 var ContentClickInternal = {
   _timer: null,
@@ -87,7 +87,7 @@ var ContentClickInternal = {
     this.initContentAreaClick();
   },
 
-  onQuitApplication: function () {
+  onQuitApplication: function() {
     if (this._timer)
       this._timer.clear();
 
@@ -606,7 +606,7 @@ var ContentClickInternal = {
       }
     }
 
-    if (typeof GM_function !=  "function")
+    if (typeof GM_function != "function")
       return;
 
     this._GM_function.set(window, GM_function);
@@ -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;
     }
@@ -708,7 +708,7 @@ var ContentClickInternal = {
   },
 
   isUrlForDownload: function TMP_isUrlForDownload(linkHref) {
-    //we need this check when calling from onDragOver and onDrop
+    // we need this check when calling from onDragOver and onDrop
     if (linkHref.startsWith("mailto:"))
       return true;
 
@@ -718,15 +718,15 @@ var ContentClickInternal = {
     var linkHrefExt = "";
     if (linkHref) {
       linkHref = linkHref.toLowerCase();
-      linkHrefExt = linkHref.substring(linkHref.lastIndexOf("/"),linkHref.length);
-      linkHrefExt = linkHrefExt.substring(linkHrefExt.indexOf("."),linkHrefExt.length);
+      linkHrefExt = linkHref.substring(linkHref.lastIndexOf("/"), linkHref.length);
+      linkHrefExt = linkHrefExt.substring(linkHrefExt.indexOf("."), linkHrefExt.length);
     }
 
     var testString, hrefExt, testExt;
     for (var l = 0; l < filetype.length; l++) {
-      if (filetype[l].indexOf("/") != -1){
+      if (filetype[l].indexOf("/") != -1) {
       // add \ before first ?
-        testString = filetype[l].substring(1,filetype[l].length-1).replace(/^\?/,"\\?");
+        testString = filetype[l].substring(1, filetype[l].length - 1).replace(/^\?/, "\\?");
         hrefExt = linkHref;
       }
       else {
@@ -1092,7 +1092,7 @@ var ContentClickInternal = {
         try {
           var publicSuffix = Services.eTLD.getPublicSuffixFromHost(url.hostPort);
           level = (publicSuffix.indexOf(".") == -1) ? 2 : 3;
-        } catch(e) {
+        } catch (e) {
           level = 2;
         }
         var host = url.hostPort.split(".");
diff --git a/modules/ContextMenu.jsm b/modules/ContextMenu.jsm
index 1ec8025..75fcc24 100644
--- a/modules/ContextMenu.jsm
+++ b/modules/ContextMenu.jsm
@@ -22,7 +22,7 @@ this.ContextMenu = {
 
     let filter = {
       acceptNode: function(n) {
-        if(n.nodeName == 'A' || n.nodeName == 'li') {
+        if (n.nodeName == 'A' || n.nodeName == 'li') {
           return Ci.nsIDOMNodeFilter.FILTER_ACCEPT;
         }
         else {
diff --git a/modules/Decode.jsm b/modules/Decode.jsm
index c27c575..7702011 100644
--- a/modules/Decode.jsm
+++ b/modules/Decode.jsm
@@ -29,7 +29,7 @@ this.Decode = {
 
 let escapeHash = {};
 
-function getReturnValue (input) {
+function getReturnValue(input) {
   var ret = escapeHash[input];
   if (!ret) {
     if (input.length - 1) {
diff --git a/modules/DocShellCapabilities.jsm b/modules/DocShellCapabilities.jsm
index 22e9ace..e003b61 100644
--- a/modules/DocShellCapabilities.jsm
+++ b/modules/DocShellCapabilities.jsm
@@ -44,7 +44,7 @@ this.DocShellCapabilities = {
     try {
       let handler = TabmixSvc.syncHandlers.get(browser.permanentKey);
       return handler.getCapabilities();
-    } catch(ex) { }
+    } catch (ex) { }
     return "";
   },
 
diff --git a/modules/DownloadLastDir.jsm b/modules/DownloadLastDir.jsm
index 411b29b..56e142b 100644
--- a/modules/DownloadLastDir.jsm
+++ b/modules/DownloadLastDir.jsm
@@ -1,4 +1,4 @@
-///"use strict";
+/// "use strict";
 
 /* jshint strict: false */
 
diff --git a/modules/DynamicRules.jsm b/modules/DynamicRules.jsm
index bac8e91..c1ae847 100644
--- a/modules/DynamicRules.jsm
+++ b/modules/DynamicRules.jsm
@@ -12,12 +12,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "Services",
 XPCOMUtils.defineLazyModuleGetter(this, "TabmixSvc",
   "resource://tabmixplus/Services.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "Prefs", function () {
+XPCOMUtils.defineLazyGetter(this, "Prefs", function() {
   return Services.prefs.getBranch("extensions.tabmix.styles.");
 });
 
 let TYPE;
-XPCOMUtils.defineLazyGetter(this, "SSS", function () {
+XPCOMUtils.defineLazyGetter(this, "SSS", function() {
     let sss = Cc['@mozilla.org/content/style-sheet-service;1']
                         .getService(Ci.nsIStyleSheetService);
     TYPE = sss.AGENT_SHEET;
@@ -40,7 +40,7 @@ this.DynamicRules = {
 
   _initialized: false,
 
-  init: function (aWindow) {
+  init: function(aWindow) {
     if (this._initialized)
       return;
     this._initialized = true;
@@ -48,7 +48,7 @@ this.DynamicRules = {
     this.treeStyleTab = aWindow.Tabmix.extensions.treeStyleTab;
 
     Prefs.addObserver("", this, false);
-    STYLENAMES.forEach(function(pref){
+    STYLENAMES.forEach(function(pref) {
       Services.prefs.addObserver("extensions.tabmix." + pref, this, false);
     }, this);
     Services.obs.addObserver(this, "quit-application", false);
@@ -69,7 +69,7 @@ this.DynamicRules = {
     }
   },
 
-  onPrefChange: function (data) {
+  onPrefChange: function(data) {
     let prefName = data.split(".").pop();
     if (STYLENAMES.indexOf(prefName) > -1) {
       if (prefName == data)
@@ -79,16 +79,16 @@ this.DynamicRules = {
     }
   },
 
-  onQuitApplication: function () {
+  onQuitApplication: function() {
     Services.obs.removeObserver(this, "quit-application");
     Prefs.removeObserver("", this);
-    STYLENAMES.forEach(function(pref){
+    STYLENAMES.forEach(function(pref) {
       Services.prefs.removeObserver("extensions.tabmix." + pref, this);
       this.unregisterSheet(pref);
     }, this);
   },
 
-  updateOpenedWindows: function (ruleName) {
+  updateOpenedWindows: function(ruleName) {
     // update all opened windows
     let windowsEnum = Services.wm.getEnumerator("navigator:browser");
     while (windowsEnum.hasMoreElements()) {
@@ -102,11 +102,11 @@ this.DynamicRules = {
     }
   },
 
-  createTemplates: function () {
+  createTemplates: function() {
     // String.prototype.repeat available from Firefox 24.0
     let space20 = '                    ';
     let space26 = '                          ';
-    let bgImage = { };
+    let bgImage = {};
     bgImage.body = "linear-gradient(#topColor, #bottomColor)";
     let bottomBorder = "linear-gradient(to top, rgba(10%,10%,10%,.4) 1px, transparent 1px),\n";
     bgImage.bg = TabmixSvc.isMac ? bgImage.body : (bottomBorder + space20 + bgImage.body);
@@ -130,19 +130,19 @@ this.DynamicRules = {
     let styleRules = {
       currentTab: {
         text: '#tabbrowser-tabs[tabmix_currentStyle~="text"] > .tabbrowser-tab' + tabState.current + tabTextRule,
-        bg:   '#tabbrowser-tabs[tabmix_currentStyle~="bg"] > .tabbrowser-tab' + tabState.current + backgroundRule
+        bg: '#tabbrowser-tabs[tabmix_currentStyle~="bg"] > .tabbrowser-tab' + tabState.current + backgroundRule
       },
       unloadedTab: {
         text: '#tabbrowser-tabs[tabmix_unloadedStyle~="text"] > .tabbrowser-tab' + tabState.unloaded + tabTextRule,
-        bg:   '#tabbrowser-tabs[tabmix_unloadedStyle~="bg"] > .tabbrowser-tab' + tabState.unloaded + backgroundRule
+        bg: '#tabbrowser-tabs[tabmix_unloadedStyle~="bg"] > .tabbrowser-tab' + tabState.unloaded + backgroundRule
       },
       unreadTab: {
         text: '#tabbrowser-tabs[tabmix_unreadStyle~="text"] > .tabbrowser-tab' + tabState.unread + tabTextRule,
-        bg:   '#tabbrowser-tabs[tabmix_unreadStyle~="bg"] > .tabbrowser-tab' + tabState.unread + backgroundRule
+        bg: '#tabbrowser-tabs[tabmix_unreadStyle~="bg"] > .tabbrowser-tab' + tabState.unread + backgroundRule
       },
       otherTab: {
         text: '#tabbrowser-tabs[tabmix_otherStyle~="text"] > .tabbrowser-tab' + tabState.other + tabTextRule,
-        bg:   '#tabbrowser-tabs[tabmix_otherStyle~="bg"] > .tabbrowser-tab' + tabState.other + backgroundRule
+        bg: '#tabbrowser-tabs[tabmix_otherStyle~="bg"] > .tabbrowser-tab' + tabState.other + backgroundRule
       },
     };
 
@@ -172,7 +172,7 @@ this.DynamicRules = {
         let hover = rule == "currentTab" ? "" : ":hover";
         let selector = ruleSelector.replace("#HOVER", hover);
         let type = hover.replace(":", "") || "selected";
-        style["bg" + type] =       selector + ' .tab-background-middle {\n' +
+        style["bg" + type] = selector + ' .tab-background-middle {\n' +
                                    '  background-image: ' + bgImage["bg" + type] + ' !important;\n}\n';
         style["startEnd" + type] = selector + ' :-moz-any(.tab-background-start, .tab-background-end)::before {\n' +
                                    '  background-image: ' + bgImage["startEnd" + type] + ' !important;\n}\n';
@@ -190,7 +190,7 @@ this.DynamicRules = {
     this.cssTemplates = styleRules;
   },
 
-  userChangedStyle: function (ruleName, notifyWindows) {
+  userChangedStyle: function(ruleName, notifyWindows) {
     if (ruleName in this && this[ruleName] == "preventUpdate")
       return;
 
@@ -208,12 +208,12 @@ this.DynamicRules = {
     }
 
     // update styles on start or when user changed or enable color
-    let changed = !val ||                                          // on start
-                  prefObj.bg && (!val.bg ||                     // bgColor enabled
-                    val.bgColor != prefObj.bgColor ||           // bgColor changed
-                    val.bgTopColor != prefObj.bgTopColor) ||    // bgTopColor changed
-                  prefObj.text && (!val.text ||                 // textColor enabled
-                    val.textColor != prefObj.textColor);        // textColor changed
+    let changed = !val || // on start
+                  prefObj.bg && (!val.bg || // bgColor enabled
+                    val.bgColor != prefObj.bgColor || // bgColor changed
+                    val.bgTopColor != prefObj.bgTopColor) || // bgTopColor changed
+                  prefObj.text && (!val.text || // textColor enabled
+                    val.textColor != prefObj.textColor); // textColor changed
 
     if (changed)
       this.updateStyles(ruleName, prefObj);
@@ -222,7 +222,7 @@ this.DynamicRules = {
       this.updateOpenedWindows(ruleName);
   },
 
-  updateStyles: function (name, prefObj) {
+  updateStyles: function(name, prefObj) {
     if (this.treeStyleTab && name != "progressMeter")
       return;
     let templates = this.cssTemplates[name];
@@ -280,13 +280,13 @@ this.DynamicRules = {
     delete this.defaultPrefs;
     let defaults = {};
     let getDefaultBranch = Services.prefs.getDefaultBranch("extensions.tabmix.styles.");
-    STYLENAMES.forEach(function(pref){
+    STYLENAMES.forEach(function(pref) {
       defaults[pref] = getDefaultBranch.getCharPref(pref);
     }, this);
     return (this.defaultPrefs = defaults);
   },
 
-  validatePrefValue: function (ruleName) {
+  validatePrefValue: function(ruleName) {
     // styles format: italic:boolean, bold:boolean, underline:boolean,
     //                text:boolean, textColor:string, textOpacity:string,
     //                bg:boolean, bgColor:string, bgOpacity:striung
@@ -320,7 +320,7 @@ this.DynamicRules = {
         value = getRGBcolor(value, opacityValue);
       }
       else if (value !== undefined && typeof value != "boolean") {
-        if (/^true$|^false$/.test(value.replace(/[\s]/g,"")))
+        if (/^true$|^false$/.test(value.replace(/[\s]/g, "")))
           value = value == "true" ? true : false;
         else
           value = undefined;
@@ -345,19 +345,19 @@ function getRGBcolor(aColorCode, aOpacity) {
   let newRGB = [];
   let _length = aColorCode.length;
   if (/^rgba|rgb/.test(aColorCode)) {
-    newRGB = aColorCode.replace(/rgba|rgb|\(|\)/g,"").split(",").splice(0, 4);
+    newRGB = aColorCode.replace(/rgba|rgb|\(|\)/g, "").split(",").splice(0, 4);
     if (newRGB.length < 3)
       return null;
     for (let i = 0; i < newRGB.length; i++) {
-      if (isNaN(newRGB[i].replace(/[\s]/g,"") * 1))
+      if (isNaN(newRGB[i].replace(/[\s]/g, "") * 1))
         return null;
     }
   }
   else if (/^#/.test(aColorCode) && _length == 4 || _length == 7) {
-    aColorCode = aColorCode.replace("#","");
+    aColorCode = aColorCode.replace("#", "");
     let subLength = _length == 7 ? 2 : 1;
     for (let i = 0; i < 3; i++) {
-      let subS = aColorCode.substr(i*subLength, subLength);
+      let subS = aColorCode.substr(i * subLength, subLength);
       if (_length == 4)
         subS += subS;
       var newNumber = parseInt(subS, 16);
diff --git a/modules/MergeWindows.jsm b/modules/MergeWindows.jsm
index cfd9651..af899df 100644
--- a/modules/MergeWindows.jsm
+++ b/modules/MergeWindows.jsm
@@ -64,7 +64,7 @@ this.MergeWindows = {
       if (aOptions.tabsSelected) {
         // merge tabs from the popup window into the current window
         // remove or move to new window tabs that wasn't selected
-        for (let i = tabbrowser.tabs.length - 1; i >=0; i--) {
+        for (let i = tabbrowser.tabs.length - 1; i >= 0; i--) {
           let tab = tabbrowser.tabs[i];
           if (tab.hasAttribute("mergeselected")) {
             tab.removeAttribute("mergeselected");
@@ -242,7 +242,7 @@ this.MergeWindows = {
                        "private" in aOptions;
 
     let privateNotMatch = 0;
-    let isSuitableBrowserWindow = function (win) {
+    let isSuitableBrowserWindow = function(win) {
       let suitable = win != aWindow && !win.closed;
       if (!suitable || !checkPrivacy)
         return suitable;
@@ -294,7 +294,7 @@ this.MergeWindows = {
       const priority = notificationBox.PRIORITY_INFO_MEDIUM;
       let notificationBar = notificationBox.appendNotification(errorMessage,
                                 name, errorimage, priority, null);
-      aWindow.setTimeout(function(){
+      aWindow.setTimeout(function() {
         notificationBox.removeNotification(notificationBar);
       }, 10000);
     }
@@ -310,7 +310,7 @@ this.MergeWindows = {
     if (!shouldPrompt)
       return true;
 
-    var promptAgain = { value:true };
+    var promptAgain = {value: true};
     canClose = Services.prompt.confirmCheck(aWindow,
                    TabmixSvc.getString('tmp.merge.warning.title'),
                    TabmixSvc.getString('tmp.merge.warning.message'),
diff --git a/modules/Places.jsm b/modules/Places.jsm
index 60f27b3..a604b85 100644
--- a/modules/Places.jsm
+++ b/modules/Places.jsm
@@ -36,7 +36,7 @@ this.TabmixPlacesUtils = Object.freeze({
   }
 });
 
-let Tabmix = { };
+let Tabmix = {};
 
 var PlacesUtilsInternal = {
   _timer: null,
@@ -53,7 +53,7 @@ var PlacesUtilsInternal = {
     this.initPlacesUIUtils(aWindow);
   },
 
-  onQuitApplication: function () {
+  onQuitApplication: function() {
     if (this._timer)
       this._timer.clear();
 
@@ -134,7 +134,7 @@ var PlacesUtilsInternal = {
         '{uri: child.uri,',
         '{id: child.itemId, uri: child.uri,', {flags: "g"}
       )._replace(
-        'this.',  'PlacesUtils.', {flags: "g"}
+        'this.', 'PlacesUtils.', {flags: "g"}
       ).toCode(false, PlacesUIUtils, "tabmix_getURLsForContainerNode");
 
       Tabmix.changeCode(PlacesUIUtils, "PlacesUIUtils.openContainerNodeInTabs")._replace(
diff --git a/modules/RenameTab.jsm b/modules/RenameTab.jsm
index 153a7cf..a57f08a 100644
--- a/modules/RenameTab.jsm
+++ b/modules/RenameTab.jsm
@@ -130,7 +130,7 @@ this.RenameTab = {
     this.hidePopup();
   },
 
-  handleEvent: function (aEvent) {
+  handleEvent: function(aEvent) {
     if (aEvent.type == "keypress" &&
          aEvent.keyCode == Components.interfaces.nsIDOMKeyEvent.DOM_VK_RETURN &&
          aEvent.target.localName != "button")
diff --git a/modules/Services.jsm b/modules/Services.jsm
index 3d69248..6a4d12e 100644
--- a/modules/Services.jsm
+++ b/modules/Services.jsm
@@ -20,7 +20,7 @@ function isVersion(aVersionNo) {
     return _versions[aVersionNo];
 
   let v = Services.appinfo.version;
-  return (_versions[aVersionNo] = Services.vc.compare(v, aVersionNo/10 + ".0a1") >= 0);
+  return (_versions[aVersionNo] = Services.vc.compare(v, aVersionNo / 10 + ".0a1") >= 0);
 }
 
 this.TabmixSvc = {
@@ -95,7 +95,7 @@ this.TabmixSvc = {
     try {
       // this pref exist only in windows
       return (this.direct2dDisabled = Services.prefs.getBoolPref("gfx.direct2d.disabled"));
-    } catch(ex) {}
+    } catch (ex) {}
     return (this.direct2dDisabled = false);
   },
 
@@ -121,19 +121,19 @@ this.TabmixSvc = {
     parse: function TMP_parse(str) {
       try {
         return JSON.parse(str);
-      } catch(ex) {
+      } 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) {
       try {
         return JSON.stringify(obj);
-      } catch(ex) {
+      } catch (ex) {
         try {
           return "encode" in this.nsIJSON ? this.nsIJSON.encode(obj) : null;
-        } catch(er) {return null}
+        } catch (er) {return null}
       }
     }
   },
@@ -250,7 +250,7 @@ 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") ?
+  return this.topWin().document.getElementById("tab-curve-clip-path-start") ?
           true : false;
 });
 
@@ -263,32 +263,32 @@ XPCOMUtils.defineLazyGetter(TabmixSvc, "prefs", function() {
 });
 
 // Tabmix preference branch
-XPCOMUtils.defineLazyGetter(TabmixSvc, "prefBranch", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "prefBranch", function() {
   return Services.prefs.getBranch("extensions.tabmix.");
 });
 // string bundle
-XPCOMUtils.defineLazyGetter(TabmixSvc, "_strings", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "_strings", function() {
   let properties = "chrome://tabmixplus/locale/tabmix.properties";
   return Services.strings.createBundle(properties);
 });
-XPCOMUtils.defineLazyGetter(TabmixSvc, "SMstrings", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "SMstrings", function() {
   let properties = "chrome://tabmixplus/locale/session-manager.properties";
   return Services.strings.createBundle(properties);
 });
 
-XPCOMUtils.defineLazyGetter(TabmixSvc, "isMac", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "isMac", function() {
   return Services.appinfo.OS == "Darwin";
 });
 
-XPCOMUtils.defineLazyGetter(TabmixSvc, "isLinux", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "isLinux", function() {
   return Services.appinfo.OS == "Linux";
 });
 
-XPCOMUtils.defineLazyGetter(TabmixSvc, "isPaleMoon", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "isPaleMoon", function() {
   return Services.appinfo.name == "Pale Moon";
 });
 
-XPCOMUtils.defineLazyGetter(TabmixSvc, "isPaleMoonID", function () {
+XPCOMUtils.defineLazyGetter(TabmixSvc, "isPaleMoonID", function() {
   return Services.appinfo.ID == "{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}";
 });
 
diff --git a/modules/Shortcuts.jsm b/modules/Shortcuts.jsm
index eb39e84..b16f3cf 100644
--- a/modules/Shortcuts.jsm
+++ b/modules/Shortcuts.jsm
@@ -346,7 +346,7 @@ this.Shortcuts = {
     let key = value && this.keyParse(value);
     if (!key)
       return "";
-    let modifiers = key.modifiers.replace(/^[\s,]+|[\s,]+$/g,"")
+    let modifiers = key.modifiers.replace(/^[\s,]+|[\s,]+$/g, "")
           .replace("ctrl", "control").split(",");
     key.modifiers = ["control","meta","accel","alt","shift"].filter(mod => {
       return new RegExp(mod).test(modifiers);
@@ -355,7 +355,7 @@ this.Shortcuts = {
     // make sure that key and keycod are valid
     key.key = key.key.toUpperCase();
     if (key.key == " ")
-      [key.key , key.keycode] = ["", "VK_SPACE"];
+      [key.key, key.keycode] = ["", "VK_SPACE"];
     else {
       key.keycode = "VK_" + key.keycode.toUpperCase().replace(/^VK_/, "");
       if (key.keycode != "VK_BACK" && !(("DOM_" + key.keycode) in Ci.nsIDOMKeyEvent))
@@ -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
@@ -535,7 +535,7 @@ var KeyConfig = {
     }
   },
 
-  resetPref: function (prefName) {
+  resetPref: function(prefName) {
     this.prefs.clearUserPref(prefName);
   }
 
@@ -558,7 +558,7 @@ function getFormattedKey(key) {
 
   if (key.modifiers) {
     let sep = getPlatformKeys("MODIFIER_SEPARATOR");
-    key.modifiers.replace(/^[\s,]+|[\s,]+$/g,"").split(/[\s,]+/g).forEach(function(mod){
+    key.modifiers.replace(/^[\s,]+|[\s,]+$/g, "").split(/[\s,]+/g).forEach(function(mod) {
       if (/alt|shift|control|meta|accel/.test(mod))
         val += getPlatformKeys("VK_" + mod.toUpperCase()) + sep;
     });
@@ -601,8 +601,8 @@ function getPlatformKeys(key) {
 
 function getPlatformAccel() {
   switch (Services.prefs.getIntPref("ui.key.accelKey")) {
-    case 17:  return "control";
-    case 18:  return "alt";
+    case 17: return "control";
+    case 18: return "alt";
     case 224: return "meta";
   }
   return (Services.appinfo.OS == "Darwin" ? "meta" : "control");
diff --git a/modules/SingleWindowModeUtils.jsm b/modules/SingleWindowModeUtils.jsm
index 2754bc6..4c8e443 100644
--- a/modules/SingleWindowModeUtils.jsm
+++ b/modules/SingleWindowModeUtils.jsm
@@ -87,10 +87,10 @@ this.SingleWindowModeUtils = {
     aWindow.resizeTo(10, 10);
     aWindow.moveTo(-50, -50);
     win.removeAttribute("sizemode");
-    win.setAttribute("width" , 0);
-    win.setAttribute("height" , 0);
-    win.setAttribute("screenX" , aWindow.screen.availWidth + 10);
-    win.setAttribute("screenY" , aWindow.screen.availHeight + 10);
+    win.setAttribute("width", 0);
+    win.setAttribute("height", 0);
+    win.setAttribute("screenX", aWindow.screen.availWidth + 10);
+    win.setAttribute("screenY", aWindow.screen.availHeight + 10);
 
     return true;
   },
@@ -159,7 +159,7 @@ this.SingleWindowModeUtils = {
         for (let i = 1; i < urls.length; ++i)
           existingBrowser.addTab(urls[i]);
       }
-    } catch(ex) {  }
+    } catch (ex) { }
     try {
       // we need to close the window after timeout so other extensions don't fail.
       // if we don't add this here BrowserShutdown fails
@@ -181,7 +181,7 @@ this.SingleWindowModeUtils = {
       let pluginCrashed = TabmixSvc.version(400) ? "NPAPIPluginCrashed" : "pluginCrashed";
       obs.addObserver(newWindow.gPluginHandler[pluginCrashed], "plugin-crashed", false);
       newWindow.gPrivateBrowsingUI.uninit = function() {};
-      existingWindow.setTimeout(function () {
+      existingWindow.setTimeout(function() {
         // restore window dimensions, to prevent flickring in the next restart
         var win = newWindow.document.documentElement;
         if (typeof newWindow.__winRect == "object") {
@@ -195,7 +195,7 @@ this.SingleWindowModeUtils = {
         }
         // for the case the window is minimized or not in focus
         existingWindow.focus();
-      },0);
-    }  catch(ex) {existingWindow.Tabmix.obj(ex);}
+      }, 0);
+    } catch (ex) {existingWindow.Tabmix.obj(ex);}
   }
 };
diff --git a/modules/Slideshow.jsm b/modules/Slideshow.jsm
index 51d367c..0ba01c6 100644
--- a/modules/Slideshow.jsm
+++ b/modules/Slideshow.jsm
@@ -14,7 +14,7 @@ function flst() {
   this.flstOff = TabmixSvc.getString("flstOff.label");
   this.slideshowOn = TabmixSvc.getString("slideshowOn.label");
   this.slideshowOff = TabmixSvc.getString("slideshowOff.label");
-  XPCOMUtils.defineLazyGetter(this, "tabContainer", function () {return TabmixSvc.topWin().gBrowser.tabContainer;});
+  XPCOMUtils.defineLazyGetter(this, "tabContainer", function() {return TabmixSvc.topWin().gBrowser.tabContainer;});
 }
 
 flst.prototype = {
@@ -27,7 +27,7 @@ flst.prototype = {
     catch (e) { }
   },
 
-  //toggle flst on/off
+  // toggle flst on/off
   toggle: function() {
     if (TabmixSvc.prefBranch.getIntPref("focusTab") != 4) {
       TabmixSvc.prefBranch.setIntPref("focusTab", 4);
@@ -45,7 +45,7 @@ flst.prototype = {
     }
     else if (this.moreThenOneTab) {
       let timerInterval = TabmixSvc.prefBranch.getIntPref("slideDelay") * 1000;
-      this.slideShowTimer =  Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
+      this.slideShowTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       this.slideShowTimer.initWithCallback(this, timerInterval,
                         Ci.nsITimer.TYPE_REPEATING_SLACK);
       this.showAlert(this.slideshowOn, "slideShow");
diff --git a/modules/extensions/CompatibilityCheck.jsm b/modules/extensions/CompatibilityCheck.jsm
index 6bcd96e..1207a70 100644
--- a/modules/extensions/CompatibilityCheck.jsm
+++ b/modules/extensions/CompatibilityCheck.jsm
@@ -58,7 +58,7 @@ CompatibilityCheck.prototype = {
 
     function AddOn(addon) {
       this.name = addon.name;
-      this.id =  addon.id;
+      this.id = addon.id;
       this._version = addon.version;
     }
     AddOn.prototype = {
@@ -96,10 +96,10 @@ CompatibilityCheck.prototype = {
     var list = this.list;
     try {
       list.sort();
-    } catch(ex) { }
+    } catch (ex) { }
 
     var outStr = "";
-    for ( let i = 0; i < list.length; i++ ) {
+    for (let i = 0; i < list.length; i++) {
       let name = list[i]._name;
       name = name.charAt(0).toUpperCase() + name.substr(1);
       outStr += " - " + name + " " + list[i]._version + "\n";
@@ -119,7 +119,7 @@ CompatibilityCheck.prototype = {
     // make promptService non modal on startup
     var self = this;
     var callBack = this.callbackDialog ? null :
-                   function (aResult) {
+                   function(aResult) {
                      aResult.showatStart = showatStart;
                      self.promptCallBack(aResult);
                    };
@@ -164,7 +164,7 @@ CompatibilityCheck.prototype = {
       let button = TabmixSvc.setLabel("sm.button.continue");
       let buttons = ["", button].join("\n");
       // make it not modal on startup
-      let callBack = this.callbackDialog ? null : function () {/* nothing to do */};
+      let callBack = this.callbackDialog ? null : function() {/* nothing to do */};
       this.window.Tabmix.promptService([TMP_BUTTON_CANCEL, TMP_HIDE_MENUANDTEXT, TMP_HIDE_CHECKBOX],
                    [title, msg, "", "", buttons], this.window, callBack);
     }
@@ -183,50 +183,50 @@ CompatibilityCheck.prototype = {
      *
      *  Add extensions ID in lowercase.
      */
-    guid_list['{00bdd586-51fb-4b06-9c23-af2fb7609bf3}'] = true;   //   Basics
-    guid_list['{b98719b3-76d6-4bec-aeed-3ab542b23bd7}'] = true;   //   BlankLast
-    guid_list['{47921160-3085-4023-a145-8ec466babfba}'] = true;   //   Click2Tab
-    guid_list['{b0f9cad2-ebae-4685-b518-d3d9b41ea183}'] = true;   //   Close Tab On Double Click
-    guid_list['ctc at clav.mozdev.org'] = true;                      //   CTC
-    guid_list['{61ed2a9a-39eb-4aaf-bd14-06dfbe8880c3}'] = true;   //   Duplicate Tab
-    guid_list['flowtabs'] = true;                                 //   Flowing Tabs
-    guid_list['{cd2b821e-19f9-40a7-ac5c-08d6c197fc43}'] = true;   //   FLST
-    guid_list['{68e5dd30-a659-4987-99f9-eaf21f9d4140}'] = true;   //   LastTab
-    guid_list['minit at dorando'] = true;                            //   MiniT
-    guid_list['minit-drag'] = true;                               //   miniT-drag
-    guid_list['minit-tabscroll at dorando'] = true;                  //   miniT-tabscroll
-    guid_list['new-tab-button-on-tab-bar at mikegoodspeed.com']  = true;   //   new tab button on tab bar
-    guid_list['{66e978cd-981f-47df-ac42-e3cf417c1467}'] = true;   //   new tab homepage
-    guid_list['newtaburl at sogame.cat'] = true;                     //   NewTabURL
-    guid_list['{4b2867d9-2973-42f3-bd9b-5ad30127c444}'] = true;   //   Petite Tabbrowser Extensions
-    guid_list['{888d99e7-e8b5-46a3-851e-1ec45da1e644}'] = true;   //   ReloadEvery
-    guid_list['{aede9b05-c23c-479b-a90e-9146ed62d377}'] = true;   //   Reload Tab On Double-Click
-    guid_list['{492aa940-beaa-11d8-9669-0800200c9a66}'] = true;   //   Scrollable Tabs
-    guid_list['{eb922232-fd76-4eb0-bd5a-c1cba4238343}'] = true;   //   Single Window
-    guid_list['{149c6cc6-ec62-4ebd-b719-3c2e867930c7}'] = true;   //   Stack style tabs
-    guid_list['supert at studio17.wordpress.com'] = true;            //   superT
-    guid_list['tabbin'] = true;                                   //   Tab Bin
-    guid_list['{43520b8f-4107-4351-ac64-9bcc5eea24b9}'] = true;   //   Tab Clicking Options
-    guid_list['{bea6d1a7-882d-425f-bc75-944e0063ff3b}'] = true;   //   Tab Mix [original one]
-    guid_list['tabtowindow at sogame.cat'] = true;                   //   Tab to window
-    guid_list['tabx at clav.mozdev.org'] = true;                     //   Tab X
-    guid_list['{0b0b0da8-08ba-4bc6-987c-6bc9f4d8a81e}'] = true;   //   Tabbrowser Extensions
-    guid_list['{9b9d2aaa-ae26-4447-a7a1-633a32b19ddd}'] = true;   //   Tabbrowser Preferences
-    guid_list['tabdrag'] = true;                                  //   tabdrag-for-tablib
-    guid_list['tabfx at chaosware.net'] = true;                      //   TabFX
-    guid_list['tabsopenrelative at jomel.me.uk'] = true;             //   Tabs open ralative
-    guid_list['tablib'] = true;                                   //   tablib
-    guid_list['{328bbe91-cb86-40b0-a3fd-2b39969f9faa}'] = true;   //   Undo Close Tab
-    guid_list['undoclosetab at dorando'] = true;                     //   Undo Close Tab
-    guid_list['{99ec6690-8bb1-11da-a72b-0800200c9a66}'] = true;   //   Unread Tabs
+    guid_list['{00bdd586-51fb-4b06-9c23-af2fb7609bf3}'] = true; //   Basics
+    guid_list['{b98719b3-76d6-4bec-aeed-3ab542b23bd7}'] = true; //   BlankLast
+    guid_list['{47921160-3085-4023-a145-8ec466babfba}'] = true; //   Click2Tab
+    guid_list['{b0f9cad2-ebae-4685-b518-d3d9b41ea183}'] = true; //   Close Tab On Double Click
+    guid_list['ctc at clav.mozdev.org'] = true; //   CTC
+    guid_list['{61ed2a9a-39eb-4aaf-bd14-06dfbe8880c3}'] = true; //   Duplicate Tab
+    guid_list['flowtabs'] = true; //   Flowing Tabs
+    guid_list['{cd2b821e-19f9-40a7-ac5c-08d6c197fc43}'] = true; //   FLST
+    guid_list['{68e5dd30-a659-4987-99f9-eaf21f9d4140}'] = true; //   LastTab
+    guid_list['minit at dorando'] = true; //   MiniT
+    guid_list['minit-drag'] = true; //   miniT-drag
+    guid_list['minit-tabscroll at dorando'] = true; //   miniT-tabscroll
+    guid_list['new-tab-button-on-tab-bar at mikegoodspeed.com'] = true; //   new tab button on tab bar
+    guid_list['{66e978cd-981f-47df-ac42-e3cf417c1467}'] = true; //   new tab homepage
+    guid_list['newtaburl at sogame.cat'] = true; //   NewTabURL
+    guid_list['{4b2867d9-2973-42f3-bd9b-5ad30127c444}'] = true; //   Petite Tabbrowser Extensions
+    guid_list['{888d99e7-e8b5-46a3-851e-1ec45da1e644}'] = true; //   ReloadEvery
+    guid_list['{aede9b05-c23c-479b-a90e-9146ed62d377}'] = true; //   Reload Tab On Double-Click
+    guid_list['{492aa940-beaa-11d8-9669-0800200c9a66}'] = true; //   Scrollable Tabs
+    guid_list['{eb922232-fd76-4eb0-bd5a-c1cba4238343}'] = true; //   Single Window
+    guid_list['{149c6cc6-ec62-4ebd-b719-3c2e867930c7}'] = true; //   Stack style tabs
+    guid_list['supert at studio17.wordpress.com'] = true; //   superT
+    guid_list['tabbin'] = true; //   Tab Bin
+    guid_list['{43520b8f-4107-4351-ac64-9bcc5eea24b9}'] = true; //   Tab Clicking Options
+    guid_list['{bea6d1a7-882d-425f-bc75-944e0063ff3b}'] = true; //   Tab Mix [original one]
+    guid_list['tabtowindow at sogame.cat'] = true; //   Tab to window
+    guid_list['tabx at clav.mozdev.org'] = true; //   Tab X
+    guid_list['{0b0b0da8-08ba-4bc6-987c-6bc9f4d8a81e}'] = true; //   Tabbrowser Extensions
+    guid_list['{9b9d2aaa-ae26-4447-a7a1-633a32b19ddd}'] = true; //   Tabbrowser Preferences
+    guid_list['tabdrag'] = true; //   tabdrag-for-tablib
+    guid_list['tabfx at chaosware.net'] = true; //   TabFX
+    guid_list['tabsopenrelative at jomel.me.uk'] = true; //   Tabs open ralative
+    guid_list['tablib'] = true; //   tablib
+    guid_list['{328bbe91-cb86-40b0-a3fd-2b39969f9faa}'] = true; //   Undo Close Tab
+    guid_list['undoclosetab at dorando'] = true; //   Undo Close Tab
+    guid_list['{99ec6690-8bb1-11da-a72b-0800200c9a66}'] = true; //   Unread Tabs
     // updated 2009-08-01
-    guid_list['undoclosedtabsbutton at supernova00.biz'] = true;     //   Undo closed button
+    guid_list['undoclosedtabsbutton at supernova00.biz'] = true; //   Undo closed button
     guid_list['remove-new-tab-button at forerunnerdesigns.com'] = true;//   Remove new tab button
-    guid_list['last-tab-close-button at victor.sacharin'] = true;    //   Last tab close button
+    guid_list['last-tab-close-button at victor.sacharin'] = true; //   Last tab close button
     // 2010-09-15
-    guid_list['tabutils at ithinc.cn'] = true;                       //   Tab Utilities
+    guid_list['tabutils at ithinc.cn'] = true; //   Tab Utilities
     // 2012-05-23
-    guid_list['tab-width at design-noir.de'] = true;                 //   Custom Tab Width
+    guid_list['tab-width at design-noir.de'] = true; //   Custom Tab Width
     return guid_list;
   }
 };
diff --git a/modules/extensions/TabGroupsManager.jsm b/modules/extensions/TabGroupsManager.jsm
index 6f7ee88..cffa6bb 100644
--- a/modules/extensions/TabGroupsManager.jsm
+++ b/modules/extensions/TabGroupsManager.jsm
@@ -62,7 +62,7 @@ this.TMP_TabGroupsManager = {
     sessionManager._moveTabsToGroupByTGM = function(window, tabs) {
       let sessionStore = window.TabmixSvc.ss;
       let TGM = window.TabGroupsManager.session;
-      for (let i = 0; i < tabs.length ; i++) {
+      for (let i = 0; i < tabs.length; i++) {
         let tab = tabs[i];
         let data = sessionStore.getTabValue(tab, "__tabmixTGM");
         let [groupId, groupName] = data ? data.split(" ") : ["-1", ""];
@@ -122,7 +122,7 @@ this.TMP_TabGroupsManager = {
   },
 
   // for TabGroupsManager use - don't change function name
-  tabmixSessionsManager: function () {
+  tabmixSessionsManager: function() {
     // this here reffer to the top browser window
     if (!this.Tabmix.isFirstWindow || "tabmix_afterTabduplicated" in this)
       return false;
@@ -132,7 +132,7 @@ this.TMP_TabGroupsManager = {
   },
 
   // for TabGroupsManager use
-  _saveAllGroupsData: function (jsonText, windowNode) {
+  _saveAllGroupsData: function(jsonText, windowNode) {
     if (!this.enableBackup && !windowNode)
       return;
     try {
diff --git a/modules/log.jsm b/modules/log.jsm
index 877b39b..77a8c8b 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -29,7 +29,7 @@ this.console = {
       methodsList.shift();
     else if (methodsList[0] == "document") {
       methodsList.shift();
-      rootID = methodsList.shift().replace(/getElementById\(|\)|'|"/g , "");
+      rootID = methodsList.shift().replace(/getElementById\(|\)|'|"/g, "");
     }
     var obj;
     try {
@@ -127,7 +127,7 @@ this.console = {
     if (fn && !fnName) {
       // get file name and line number
       let lastIndexOf = fn.lastIndexOf("/");
-      fnName = lastIndexOf > -1 ? fn.substr(lastIndexOf+1) : "?";
+      fnName = lastIndexOf > -1 ? fn.substr(lastIndexOf + 1) : "?";
     }
     return fnName;
   },
@@ -187,7 +187,7 @@ options = {
     var offset = typeof level == "string" ? "  " : "";
     aMessage = aMessage ? offset + aMessage + "\n" : "";
     var objS = aObj ? offset + aObj.toString() : offset + "aObj is " + typeof(aObj);
-    objS +=  ":\n";
+    objS += ":\n";
 
     for (let prop in aObj) {
       try {
@@ -264,8 +264,8 @@ options = {
   log: function TMP_console_log(aMessage, aShowCaller, offset, caller) {
     offset = !offset ? 0 : 1;
     let names = this._getNames(aShowCaller ? 2 + offset : 1 + offset);
-    let callerName = names[offset+0];
-    let callerCallerName = aShowCaller && names[offset+1] ? " (caller was " + names[offset+1] + ")" : "";
+    let callerName = names[offset + 0];
+    let callerCallerName = aShowCaller && names[offset + 1] ? " (caller was " + names[offset + 1] + ")" : "";
     this._logMessage(" " + callerName + callerCallerName + ":\n" + aMessage, "infoFlag", caller);
   },
 
@@ -335,6 +335,6 @@ options = {
 
 };
 
-(function(self){
+(function(self) {
   self.reportError = self.reportError.bind(self);
 }(this.console));

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