[Pkg-mozext-commits] [tree-style-tab] 01/05: Imported Upstream version 0.14.2014051101

Ximin Luo infinity0 at pwned.gg
Sat May 17 15:47:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

infinity0-guest pushed a commit to branch master
in repository tree-style-tab.

commit 7cd980548fde238b60783b8d3da171477c85f62f
Author: Ximin Luo <infinity0 at pwned.gg>
Date:   Sat May 17 16:32:06 2014 +0100

    Imported Upstream version 0.14.2014051101
---
 chrome.manifest                                    |   7 +
 content/treestyletab/bookmarksOverlay.js           |  12 +-
 content/treestyletab/bookmarksOverlayEditable.js   |  12 +-
 content/treestyletab/config.xul                    |   6 +
 content/treestyletab/res/tabsDragUtils.js          |  47 +++---
 content/treestyletab/treestyletab.css              |  15 +-
 content/treestyletab/windowHelper.js               |  69 +++++---
 content/treestyletab/windowHelperHacks.js          |  41 +++++
 defaults/preferences/treestyletab.js               |  10 ++
 install.rdf                                        |  18 +-
 locale/{ja => cs}/treestyletab/license.txt         |  68 ++++----
 locale/cs/treestyletab/treestyletab.dtd            | 187 +++++++++++++++++++++
 locale/cs/treestyletab/treestyletab.properties     |  55 ++++++
 locale/da-DK/treestyletab/treestyletab.dtd         |   1 +
 locale/de-DE/treestyletab/treestyletab.dtd         |   1 +
 locale/en-US/treestyletab/treestyletab.dtd         |   1 +
 locale/es-ES/treestyletab/treestyletab.dtd         |   1 +
 locale/fr-FR/treestyletab/treestyletab.dtd         |   1 +
 locale/it-IT/treestyletab/treestyletab.dtd         |   1 +
 locale/ja/treestyletab/treestyletab.dtd            |   1 +
 locale/pl/treestyletab/treestyletab.dtd            |   1 +
 locale/ru/treestyletab/treestyletab.dtd            |   1 +
 locale/sv-SE/treestyletab/treestyletab.dtd         |   1 +
 locale/zh-CN/treestyletab/treestyletab.dtd         |   1 +
 locale/zh-TW/treestyletab/treestyletab.dtd         |   1 +
 modules/autoHide.js                                |  18 +-
 modules/base.js                                    |  41 +++--
 modules/browser.js                                 | 181 +++++++++++++++-----
 modules/browserUIShowHideObserver.js               |  24 ++-
 modules/fullTooltip.js                             |  14 +-
 modules/fullscreenObserver.js                      |   7 +-
 modules/groupTab.js                                |  14 +-
 modules/lib/confirmWithPopup.js                    |  88 ++++++----
 modules/lib/inherit.jsm                            |  43 +++++
 modules/pseudoTreeBuilder.js                       |  14 +-
 modules/tabbarDNDObserver.js                       |   2 +-
 modules/utils.js                                   |  41 ++++-
 modules/window.js                                  |  92 ++++++----
 skin/classic/treestyletab/Linux-base.css           |  14 +-
 skin/classic/treestyletab/Linux-tabs-on-bottom.css |   7 +
 skin/classic/treestyletab/WINNT-base.css           |   2 +-
 skin/classic/treestyletab/base.css                 |   1 +
 skin/classic/treestyletab/sidebar/sidebar.css      |   1 +
 skin/classic/treestyletab/square/base.css          |   9 +-
 .../treestyletab/square/disable-closebox-bg.css    |  20 +++
 skin/classic/treestyletab/ui-australis.css         |   8 +
 skin/classic/treestyletab/{ui.css => ui-base.css}  |   0
 47 files changed, 915 insertions(+), 285 deletions(-)

diff --git a/chrome.manifest b/chrome.manifest
index c9dbf04..ceed7a4 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -27,6 +27,7 @@ locale	treestyletab	pl	locale/pl/treestyletab/
 locale	treestyletab	fr-FR	locale/fr-FR/treestyletab/
 locale	treestyletab	sv-SE	locale/sv-SE/treestyletab/
 locale	treestyletab	da-DK	locale/da-DK/treestyletab/
+locale	treestyletab	cs	locale/cs/treestyletab/
 
 skin	treestyletab	classic/1.0	skin/classic/treestyletab/
 
@@ -42,9 +43,15 @@ override chrome://treestyletab/skin/platform-styled.css	chrome://treestyletab/sk
 override chrome://treestyletab/skin/platform-styled.css	chrome://treestyletab/skin/dummy.css	os=Linux
 override chrome://treestyletab/skin/platform-styled.css	chrome://treestyletab/skin/WINNT-styled.css	os=WINNT
 
+override chrome://treestyletab/skin/ui.css	chrome://treestyletab/skin/ui-base.css
+override chrome://treestyletab/skin/ui.css	chrome://treestyletab/skin/ui-australis.css appversion>=29.0a1
+
+override chrome://treestyletab/skin/Linux-tabs-on-bottom.css	chrome://treestyletab/skin/dummy.css	os=Linux appversion>=29.0a1
+
 override chrome://treestyletab/skin/square/platform.css	chrome://treestyletab/skin/square/Darwin.css	os=Darwin
 override chrome://treestyletab/skin/square/platform.css	chrome://treestyletab/skin/square/Linux.css	os=Linux
 override chrome://treestyletab/skin/square/platform.css	chrome://treestyletab/skin/dummy.css	os=WINNT
+override chrome://treestyletab/skin/square/disable-closebox-bg.css	chrome://treestyletab/skin/dummy.css	os=Linux appversion>=29.0b4
 
 override chrome://treestyletab/skin/metal/platform.css	chrome://treestyletab/skin/metal/Darwin.css	os=Darwin
 override chrome://treestyletab/skin/metal/platform.css	chrome://treestyletab/skin/dummy.css	os=WINNT
diff --git a/content/treestyletab/bookmarksOverlay.js b/content/treestyletab/bookmarksOverlay.js
index 69ee846..d0eb233 100644
--- a/content/treestyletab/bookmarksOverlay.js
+++ b/content/treestyletab/bookmarksOverlay.js
@@ -2,8 +2,9 @@ Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this,
   'TreeStyleTabUtils', 'resource://treestyletab-modules/utils.js');
 
-var TreeStyleTabBookmarksService = {
-	__proto__ : TreeStyleTabService,
+(function() {
+let { inherit } = Components.utils.import('resource://treestyletab-modules/lib/inherit.jsm', {});
+var TreeStyleTabBookmarksService = inherit(TreeStyleTabService, {
 
 	get BookmarksService() {
 		if (!this._BookmarksService) {
@@ -470,7 +471,7 @@ var TreeStyleTabBookmarksService = {
 
 	_onTabsDrop : function TSTBMService_onTabsDrop(aEvent)
 	{
-		var tabs = aEvent.getData('tabs') || [];
+		var tabs = aEvent.detail.tabs;
 		var groups = this.splitTabsToSubtrees(tabs);
 		if (
 			groups.length == 1 &&
@@ -500,6 +501,9 @@ var TreeStyleTabBookmarksService = {
 		}
 	}
 
-};
+});
 
 TreeStyleTabBookmarksService.preInit();
+
+window.TreeStyleTabBookmarksService = TreeStyleTabBookmarksService;
+})();
diff --git a/content/treestyletab/bookmarksOverlayEditable.js b/content/treestyletab/bookmarksOverlayEditable.js
index 36f6641..fcae369 100644
--- a/content/treestyletab/bookmarksOverlayEditable.js
+++ b/content/treestyletab/bookmarksOverlayEditable.js
@@ -2,8 +2,9 @@ Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this,
   'TreeStyleTabUtils', 'resource://treestyletab-modules/utils.js');
 
-var TreeStyleTabBookmarksServiceEditable = {
-	__proto__ : TreeStyleTabBookmarksService,
+(function() {
+let { inherit } = Components.utils.import('resource://treestyletab-modules/lib/inherit.jsm', {});
+var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksService, {
 
 	instantApply : false,
 	canceled : false,
@@ -111,7 +112,7 @@ var TreeStyleTabBookmarksServiceEditable = {
 			'        value=""/>' +
 			'    </menupopup>' +
 			'  </menulist>' +
-			'</row>').replace(/^\s*|\s*$/g, '').replace(/>\s+</g, '><')));
+			'</row>').trim().replace(/>\s+</g, '><')));
 		range.detach();
 		document.getElementById('treestyletab-parent-label').setAttribute('value', TreeStyleTabUtils.treeBundle.getString('bookmarkProperty.parent.label'));
 		this.blankItem.setAttribute('label', TreeStyleTabUtils.treeBundle.getString('bookmarkProperty.parent.blank.label'));
@@ -356,6 +357,9 @@ var TreeStyleTabBookmarksServiceEditable = {
 		}
 	}
 
-};
+});
 
 window.addEventListener('DOMContentLoaded', TreeStyleTabBookmarksServiceEditable, false);
+
+window.TreeStyleTabBookmarksServiceEditable = TreeStyleTabBookmarksServiceEditable;
+})();
diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul
index 6d45463..43ef83a 100644
--- a/content/treestyletab/config.xul
+++ b/content/treestyletab/config.xul
@@ -640,6 +640,9 @@
 <prefpane id="prefpane-tree" label="&config.tabs.tree;"
 	onpaneload="initTreePane();">
 	<preferences>
+		<preference id="extensions.treestyletab.autoCollapseExpandSubtreeOnAttach"
+			name="extensions.treestyletab.autoCollapseExpandSubtreeOnAttach"
+			type="bool"/>
 		<preference id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
 			name="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
 			type="bool"/>
@@ -667,6 +670,9 @@
 			type="int"/>
 	</preferences>
 
+	<checkbox id="extensions.treestyletab.autoCollapseExpandSubtreeOnAttach-check"
+		preference="extensions.treestyletab.autoCollapseExpandSubtreeOnAttach"
+		label="&config.autoCollapseExpandSubtreeOnAttach;"/>
 	<checkbox id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect-check"
 		preference="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
 		label="&config.autoCollapseExpandSubtreeOnSelect;"/>
diff --git a/content/treestyletab/res/tabsDragUtils.js b/content/treestyletab/res/tabsDragUtils.js
index 048e68c..c5b07ad 100644
--- a/content/treestyletab/res/tabsDragUtils.js
+++ b/content/treestyletab/res/tabsDragUtils.js
@@ -15,7 +15,7 @@
    http://github.com/piroor/fxaddonlib-tabs-drag-utils
 */
 (function() {
-	const currentRevision = 29;
+	const currentRevision = 31;
 
 	if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
 
@@ -128,17 +128,11 @@
 
 		initTabBrowser : function TDU_initTabBrowser(aTabBrowser)
 		{
-			var tabDNDObserver = (aTabBrowser.tabContainer && aTabBrowser.tabContainer.tabbrowser == aTabBrowser) ?
-									aTabBrowser.tabContainer : // Firefox 4.0 or later
-									aTabBrowser ; // Firefox 3.5 - 3.6
-			this.initTabDNDObserver(tabDNDObserver);
+			this.initTabDNDObserver(aTabBrowser.tabContainer);
 		},
 		destroyTabBrowser : function TDU_destroyTabBrowser(aTabBrowser)
 		{
-			var tabDNDObserver = (aTabBrowser.tabContainer && aTabBrowser.tabContainer.tabbrowser == aTabBrowser) ?
-									aTabBrowser.tabContainer : // Firefox 4.0 or later
-									aTabBrowser ; // Firefox 3.5 - 3.6
-			this.destroyTabDNDObserver(tabDNDObserver);
+			this.destroyTabDNDObserver(aTabBrowser.tabContainer);
 		},
 
 		updatedTabDNDObservers : [],
@@ -708,10 +702,10 @@
 			if (aTabBrowserChild.localName == 'tabbrowser') // itself
 				return aTabBrowserChild;
 
-			if (aTabBrowserChild.tabbrowser) // tabs, Firefox 4.0 or later
+			if (aTabBrowserChild.tabbrowser) // tabs
 				return aTabBrowserChild.tabbrowser;
 
-			if (aTabBrowserChild.localName == 'toolbar') // tabs toolbar, Firefox 4.0 or later
+			if (aTabBrowserChild.localName == 'toolbar') // tabs toolbar
 				return aTabBrowserChild.getElementsByTagName('tabs')[0].tabbrowser;
 
 			var b = aTabBrowserChild.ownerDocument.evaluate(
@@ -733,7 +727,6 @@
 
 		processTabsDragging: function TDU_processTabsDragging(aEvent, aOptions)
 		{
-			// Firefox 17 and later
 			if (this.canAnimateDraggedTabs(aEvent)) {
 				let tabbar = this.getTabbarFromEvent(aEvent);
 				let draggedTab = aEvent.dataTransfer && aEvent.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@@ -777,7 +770,7 @@
 
 			var selectedTabs;
 			var isMultipleDrag = (
-					( // Firefox 4.x (https://bugzilla.mozilla.org/show_bug.cgi?id=566510)
+					( // Firefox itself (https://bugzilla.mozilla.org/show_bug.cgi?id=566510)
 						'visibleTabs' in b &&
 						(selectedTabs = b.visibleTabs.filter(function(aTab) {
 							return aTab.getAttribute('multiselected') == 'true';
@@ -825,7 +818,6 @@
  
 	 	getCurrentURIOfTab : function TDU_getCurrentURIOfTab(aTab) 
 		{
-			// Firefox 4.0-
 			if (this.isTabNeedToBeRestored(aTab)) {
 				let data = this.getRestoringData(aTab);
 				let entry = data.entries[Math.min(data.index, data.entries.length-1)];
@@ -859,11 +851,13 @@
 
 		_fireTabsDropEvent : function TDU_fireTabsDropEvent(aTabs) 
 		{
-			var event = document.createEvent('DataContainerEvents');
-			event.initEvent(this.EVENT_TYPE_TABS_DROP, true, true);
-			event.setData('tabs', aTabs);
-			// for backward compatibility
-			event.tabs = aTabs;
+			var event = new CustomEvent(this.EVENT_TYPE_TABS_DROP, {
+					bubbles    : true,
+					cancelable : true,
+					detail     : {
+						tabs : aTabs
+					}
+				});
 			return this._dropTarget.dispatchEvent(event);
 		},
 		get _dropTarget()
@@ -976,17 +970,14 @@
 
 	function StringList(aTypes) 
 	{
-		return {
-			__proto__ : aTypes,
-			item : function(aIndex)
-			{
+		return Object.create(aTypes, {
+			item : { value : function(aIndex) {
 				return this[aIndex];
-			},
-			contains : function(aType)
-			{
+			} },
+			contains : { value : function(aType) {
 				return this.indexOf(aType) > -1;
-			}
-		};
+			} }
+		});
 	}
 
 	tabsDragUtils.DOMDataTransferProxy = DOMDataTransferProxy;
diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css
index 68d5f5e..5e31618 100644
--- a/content/treestyletab/treestyletab.css
+++ b/content/treestyletab/treestyletab.css
@@ -122,8 +122,12 @@ tabbrowser[treestyletab-tabbar-autohide-mode="1"][treestyletab-tabbar-autohide="
 /* put resizer under tabs, and raise up tabs */
 .treestyletab-tabbar-toolbar[treestyletab-mode="vertical"][treestyletab-tabbar-autohide]
   > *,
+.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"][treestyletab-tabbar-autohide]
+  > #tabbrowser-tabs,
+.treestyletab-toolbar-inner-box[treestyletab-tabbar-autohide]:not([treestyletab-tabbar-fixed="true"])
+  > *,
 .treestyletab-toolbar-inner-box[treestyletab-tabbar-autohide]:not([treestyletab-tabbar-fixed="true"])
-  > * {
+  > #tabbrowser-tabs {
 	position: relative;
 	z-index: 2;
 }
@@ -157,8 +161,11 @@ tabbrowser[treestyletab-tabbar-autohide-mode="1"][treestyletab-tabbar-autohide="
 	/**
 	 * Don't make this panel completely transparent, because
 	 * mousemove event never fire on 100% transparent panel.
+	 * The color should be a pale white, instead of a pale black,
+	 * because many websites use white background. Black screen
+	 * is too glaring for white background websites.
 	 */
-	background: rgba(0, 0, 0, 0.01);
+	background: rgba(255, 255, 255, 0.01);
 	line-height: 0;
 	margin: 0;
 	padding: 0;
@@ -588,6 +595,10 @@ toolbar.treestyletab-tabbar-toolbar-ready:not([nowindowdrag="true"]),
 	/* width: 24px; */
 	z-index: 100;
 }
+.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-dom-fullscreen-activated="true"]
+  .tabbrowser-tab[pinned] {
+	z-index: -100;
+}
 
 .tabbrowser-tabs[treestyletab-mode="vertical"]
   .tabbrowser-tab[pinned]:not(.treestyletab-faviconized)
diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js
index a7a638d..895c036 100644
--- a/content/treestyletab/windowHelper.js
+++ b/content/treestyletab/windowHelper.js
@@ -40,6 +40,16 @@ var TreeStyleTabWindowHelper = {
 			)
 		);
 
+		if ('TabsInTitlebar' in window &&
+			TabsInTitlebar._update) {
+			eval('window.TabsInTitlebar._update = '+
+				window.TabsInTitlebar._update.toSource().replace(
+					/let fullTabsHeight = /,
+					'$& gBrowser.treeStyleTab.position != "top" ? 0 : $1'
+				)
+			);
+		}
+
 		if ('BrowserOpenTab' in window) {
 			eval('window.BrowserOpenTab = '+
 				window.BrowserOpenTab.toSource().replace(
@@ -73,6 +83,28 @@ var TreeStyleTabWindowHelper = {
 			);
 		}
 
+		let (functions = [
+				'window.duplicateTab.handleLinkClick',
+				'window.duplicatethistab.handleLinkClick',
+				'window.__treestyletab__highlander__origHandleLinkClick',
+				'window.__splitbrowser__handleLinkClick',
+				'window.__ctxextensions__handleLinkClick',
+				'window.handleLinkClick'
+			]) {
+			for (let i = 0, maxi = functions.length; i < maxi; i++)
+			{
+				let func = functions[i];
+				let source = this._getFunctionSource(func);
+				if (!source || !/^\(?function handleLinkClick/.test(source))
+					continue;
+				eval(func+' = '+source.replace(
+					/(charset\s*:\s*doc\.characterSet\s*)/,
+					'$1, event : event, linkNode : linkNode'
+				));
+				break;
+			}
+		}
+
 		this.overrideExtensionsPreInit(); // windowHelperHacks.js
 	},
  
@@ -155,7 +187,7 @@ var TreeStyleTabWindowHelper = {
 		eval('nsContextMenu.prototype.addDictionaries = '+
 			nsContextMenu.prototype.addDictionaries.toSource().replace(
 				'openUILinkIn(',
-				'TreeStyleTabService.onBeforeOpenLink(aWhere, this.target.ownerDocument.defaultView); $&'
+				'TreeStyleTabService.onBeforeOpenLink(where, this.target.ownerDocument.defaultView); $&'
 			)
 		);
 
@@ -178,28 +210,6 @@ var TreeStyleTabWindowHelper = {
 			}
 		}
 
-		let (functions = [
-				'window.duplicateTab.handleLinkClick',
-				'window.duplicatethistab.handleLinkClick',
-				'window.__treestyletab__highlander__origHandleLinkClick',
-				'window.__splitbrowser__handleLinkClick',
-				'window.__ctxextensions__handleLinkClick',
-				'window.handleLinkClick'
-			]) {
-			for (let i = 0, maxi = functions.length; i < maxi; i++)
-			{
-				let func = functions[i];
-				let source = this._getFunctionSource(func);
-				if (!source || !/^\(?function handleLinkClick/.test(source))
-					continue;
-				eval(func+' = '+source.replace(
-					/(charset\s*:\s*doc\.characterSet\s*)/,
-					'$1, event : event, linkNode : linkNode'
-				));
-				break;
-			}
-		}
-
 		if ('openLinkIn' in window) {
 			eval('window.openLinkIn = '+
 				window.openLinkIn.toSource().replace(
@@ -312,7 +322,7 @@ var TreeStyleTabWindowHelper = {
 					return aString
 							.replace(/\/\*.*\*\//g, '')
 							.replace(/\/\/.+$/, '')
-							.replace(/^\s+|\s+$/g, '');
+							.trim();
 				});
 	},
 	_getFunctionSource : function TSTWH__getFunctionSource(aFunc)
@@ -512,6 +522,17 @@ var TreeStyleTabWindowHelper = {
 					/\.left/g, '[treeStyleTab.startProp]'
 				).replace(
 					/\.right/g, '[treeStyleTab.endProp]'
+
+				// replace such codes:
+				//   tab = {left: tab.left, right: tab.right};
+				).replace(
+					/left\s*:/g, 'start:'
+				).replace(
+					/right\s*:/g, 'end:'
+				).replace(
+					/((tab|selected)\s*=\s*\{\s*start:[^\}]+\})/g,
+					'$1; $2[treeStyleTab.startProp] = $2.start; $2[treeStyleTab.endProp] = $2.end;'
+
 				).replace(
 					'!selected ||',
 					'$& treeStyleTab.scrollToNewTabMode == 1 && '
diff --git a/content/treestyletab/windowHelperHacks.js b/content/treestyletab/windowHelperHacks.js
index ca6510f..a0e27aa 100644
--- a/content/treestyletab/windowHelperHacks.js
+++ b/content/treestyletab/windowHelperHacks.js
@@ -1166,6 +1166,47 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
 		);
 	}
 
+	// Tile Tabs
+	// https://addons.mozilla.org/firefox/addon/tile-tabs/
+	if ('tileTabs' in window &&
+		TreeStyleTabUtils.getTreePref('compatibility.TileTabs')) {
+		if ('allocateTab' in window.tileTabs)
+			eval('tileTabs.allocateTab = '+
+				tileTabs.allocateTab.toSource().replace(
+					/(tab = gBrowser.addTab)/g,
+					'TreeStyleTabService.readyToOpenNextSiblingTabNow(); $1'
+				)
+			);
+		if ('doClickBrowser' in window.tileTabs)
+			eval('tileTabs.doClickBrowser = '+
+				tileTabs.doClickBrowser.toSource().replace(
+					/(newTab = gBrowser.loadOneTab)/g,
+					'TreeStyleTabService.readyToOpenNextSiblingTabNow(); $1'
+				)
+			);
+		if ('doDropBrowserTile' in window.tileTabs)
+			eval('tileTabs.doDropBrowserTile = '+
+				tileTabs.doDropBrowserTile.toSource().replace(
+					/(tab = gBrowser.loadOneTab)/g,
+					'TreeStyleTabService.readyToOpenNextSiblingTabNow(), $1'
+				)
+			);
+		if ('menuActions' in window.tileTabs)
+			eval('tileTabs.menuActions = '+
+				tileTabs.menuActions.toSource().replace(
+					/(tab = gBrowser.loadOneTab)/g,
+					'TreeStyleTabService.readyToOpenNextSiblingTabNow(), $1'
+				)
+			);
+		if ('applyLayoutString' in window.tileTabs)
+			eval('tileTabs.applyLayoutString = '+
+				tileTabs.applyLayoutString.toSource().replace(
+					/(tab = gBrowser.loadOneTab)/g,
+					'TreeStyleTabService.readyToOpenNextSiblingTabNow(), $1'
+				)
+			);
+	}
+
 	window.setTimeout(function(aSelf) {
 		aSelf.overrideExtensionsDelayed();
 	}, 0, this);
diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js
index 73880a8..53c7759 100644
--- a/defaults/preferences/treestyletab.js
+++ b/defaults/preferences/treestyletab.js
@@ -425,6 +425,13 @@ pref("extensions.treestyletab.autoCollapseExpandSubtreeOnSelect",      true);
  */
 pref("extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove", true);
 /**
+ * When a new child tab is opened (or attached) under an existing tab,
+ * other existing expanded trees can counteract that you find out where the new
+ * attached tab is. If you set this to "true", TST automatically collapses other
+ * expanded trees at the time.
+ */
+pref("extensions.treestyletab.autoCollapseExpandSubtreeOnAttach", true);
+/**
  * When you press Ctrl-Tab/Shift-Ctrl-Tab, Firefox advances focus of tabs.
  * If this is "true", TST expands focused tree after a delay specified
  * by another preference "autoExpandSubtreeOnSelect.whileFocusMovingByShortcut.delay".
@@ -638,6 +645,7 @@ pref("extensions.treestyletab.pinnedTab.faviconized", true);
 pref("extensions.treestyletab.compatibility.AgingTabs", true);
 pref("extensions.treestyletab.compatibility.AIOS", true); // All-in-One Sidebar
 pref("extensions.treestyletab.compatibility.Autohide", true);
+pref("extensions.treestyletab.compatibility.ClassicThemeRestorer", true);
 pref("extensions.treestyletab.compatibility.ColorfulTabs", true);
 pref("extensions.treestyletab.compatibility.ContextSearch", true);
 pref("extensions.treestyletab.compatibility.DomainTab", true);
@@ -678,7 +686,9 @@ pref("extensions.treestyletab.compatibility.STM", true); // Super Tab Mode
 pref("extensions.treestyletab.compatibility.SuperDragAndGo", true);
 pref("extensions.treestyletab.compatibility.Tabberwocky", true);
 pref("extensions.treestyletab.compatibility.TabControl", true);
+pref("extensions.treestyletab.compatibility.TabsOnBottom", true);
 pref("extensions.treestyletab.compatibility.TabUtilities", true);
+pref("extensions.treestyletab.compatibility.TileTabs", true);
 pref("extensions.treestyletab.compatibility.TMP", true); // Tab Mix Plus
 pref("extensions.treestyletab.compatibility.TooManyTabs", true);
 pref("extensions.treestyletab.compatibility.TotalToolbar", true);
diff --git a/install.rdf b/install.rdf
index 2208bba..1788ee7 100644
--- a/install.rdf
+++ b/install.rdf
@@ -5,7 +5,7 @@
   <RDF:Description RDF:about="urn:mozilla:install-manifest"
                    em:id="treestyletab at piro.sakura.ne.jp"
                    em:name="Tree Style Tab"
-                   em:version="0.14.2014020901"
+                   em:version="0.14.2014051101"
                    em:creator="YUKI "Piro" Hiroshi"
                    em:description="Show tabs like a tree."
                    em:homepageURL="http://piro.sakura.ne.jp/xul/_treestyletab.html.en"
@@ -189,12 +189,26 @@
           <em:translator>Regmos (da-DK)</em:translator>
       </RDF:Description>
     </em:localized>
+    <em:localized>
+      <RDF:Description em:locale="cs"
+                         em:name="Tree Style Tab"
+                         em:description="Uspořádává panely do stromu."
+                         em:homepageURL="http://piro.sakura.ne.jp/xul/_treestyletab.html.en"
+                         em:creator="YUKI "Piro" Hiroshi">
+            <em:contributor>Zusukar (auto-shrink mode)</em:contributor>
+            <em:contributor>Alice0775 (compatibility problem)</em:contributor>
+            <em:contributor>Philipp von Weitershausen (Sidebar style)</em:contributor>
+            <em:contributor>wanabe (some bug fixes)</em:contributor>
+            <em:contributor>Tetsuharu OHZEKI (code cleanup)</em:contributor>
+            <em:translator>Vlastimil Ovčáčík (cs)</em:translator>
+        </RDF:Description>
+    </em:localized>
 
 
     <em:targetApplication>
       <RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
                        em:minVersion="24.0"
-                       em:maxVersion="30.0a1" />
+                       em:maxVersion="32.0a1" />
     </em:targetApplication>
   </RDF:Description>
 </RDF:RDF>
diff --git a/locale/ja/treestyletab/license.txt b/locale/cs/treestyletab/license.txt
similarity index 93%
copy from locale/ja/treestyletab/license.txt
copy to locale/cs/treestyletab/license.txt
index 9dc284f..5ccdbf9 100644
--- a/locale/ja/treestyletab/license.txt
+++ b/locale/cs/treestyletab/license.txt
@@ -1,34 +1,34 @@
-***** BEGIN LICENSE BLOCK *****
-Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
-The contents of these files are subject to the Mozilla Public License Version
-1.1 (the "License"); you may not use these files except in compliance with
-the License. You may obtain a copy of the License at
-http://www.mozilla.org/MPL/
-
-Software distributed under the License is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-for the specific language governing rights and limitations under the
-License.
-
-The Original Code is the Tree Style Tab.
-
-The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
-Portions created by the Initial Developer are Copyright (C) 2007-2014
-the Initial Developer. All Rights Reserved.
-
-Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
-
-Alternatively, the contents of these files may be used under the terms of
-either the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-in which case the provisions of the GPL or the LGPL are applicable instead
-of those above. If you wish to allow use of your version of these files only
-under the terms of either the GPL or the LGPL, and not to allow others to
-use your version of these files under the terms of the MPL, indicate your
-decision by deleting the provisions above and replace them with the notice
-and other provisions required by the GPL or the LGPL. If you do not delete
-the provisions above, a recipient may use your version of these files under
-the terms of any one of the MPL, the GPL or the LGPL.
-
-***** END LICENSE BLOCK *****
+***** BEGIN LICENSE BLOCK *****
+Version: MPL 1.1/GPL 2.0/LGPL 2.1
+
+The contents of these files are subject to the Mozilla Public License Version
+1.1 (the "License"); you may not use these files except in compliance with
+the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the
+License.
+
+The Original Code is the Tree Style Tab.
+
+The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
+Portions created by the Initial Developer are Copyright (C) 2007-2014
+the Initial Developer. All Rights Reserved.
+
+Contributor(s): Vlastimil Ovcacik
+
+Alternatively, the contents of these files may be used under the terms of
+either the GNU General Public License Version 2 or later (the "GPL"), or
+the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+in which case the provisions of the GPL or the LGPL are applicable instead
+of those above. If you wish to allow use of your version of these files only
+under the terms of either the GPL or the LGPL, and not to allow others to
+use your version of these files under the terms of the MPL, indicate your
+decision by deleting the provisions above and replace them with the notice
+and other provisions required by the GPL or the LGPL. If you do not delete
+the provisions above, a recipient may use your version of these files under
+the terms of any one of the MPL, the GPL or the LGPL.
+
+***** END LICENSE BLOCK *****
diff --git a/locale/cs/treestyletab/treestyletab.dtd b/locale/cs/treestyletab/treestyletab.dtd
new file mode 100644
index 0000000..d232c52
--- /dev/null
+++ b/locale/cs/treestyletab/treestyletab.dtd
@@ -0,0 +1,187 @@
+<!ENTITY config.title        "Možnosti Tree Style Tab">
+
+<!ENTITY config.scale.min "min">
+<!ENTITY config.scale.max "max">
+
+
+<!ENTITY config.tabs.appearance "Vzhled">
+
+<!ENTITY config.tabbar.position.caption "Umístění lišty panelů">
+<!ENTITY config.tabbar.position.left    "Vlevo">
+<!ENTITY config.tabbar.position.right   "Vpravo">
+<!ENTITY config.tabbar.position.top     "Nahoře (Výchozí)">
+<!ENTITY config.tabbar.position.bottom  "Dole">
+<!ENTITY config.tabbar.invertClosebox.left  "Zobrazit zavírací tlačítko panelu vlevo">
+<!ENTITY config.tabbar.invertClosebox.right "Zobrazit zavírací tlačítko panelu vpravo">
+<!ENTITY config.tabbar.invertTab            "Nořit panely nalevo">
+<!ENTITY config.tabbar.invertTabContents    "Převrátit prvky panelu">
+<!ENTITY config.tabbar.narrowScrollbar      "Zúžit posuvník">
+<!ENTITY config.enableSubtreeIndent "Odsazovat panely">
+<!ENTITY config.maxTreeLevel.before "až do">
+<!ENTITY config.maxTreeLevel.after  "úrovní">
+<!ENTITY config.allowSubtreeCollapseExpand  "Umožnit sbalení/rozbalení stromu panelů">
+
+
+<!ENTITY config.tabs.style "Styl">
+
+<!ENTITY config.tabbar.style.caption "Styl lišty panelů">
+<!ENTITY config.tabbar.style.plain   "Prostý">
+<!ENTITY config.tabbar.style.flat    "Plochý">
+<!ENTITY config.tabbar.style.mixed   "Mix">
+<!ENTITY config.tabbar.style.vertigo "Vertigo">
+<!ENTITY config.tabbar.style.metal   "Metal">
+<!ENTITY config.tabbar.style.sidebar "Sidebar">
+<!ENTITY config.tabbar.style.none    "Výchozí (dle motivu vzhledu)">
+
+<!ENTITY config.twisty.style.caption "Styl roletky">
+<!ENTITY config.twisty.style.auto    "Automatický">
+<!ENTITY config.twisty.style.none    "Žádný">
+<!ENTITY config.twisty.style.retro   "Retro">
+<!ENTITY config.twisty.style.modern.black "Black Modern">
+<!ENTITY config.twisty.style.modern.white "White Modern">
+<!ENTITY config.twisty.style.osx     "OS X">
+
+
+<!ENTITY config.tabs.menu "Nabídka">
+
+<!ENTITY config.show.tabContextMenu.caption "Přidat následující položky do kontextové nabídky panelů">
+
+<!ENTITY config.tabs.tab "Přidávání panelů">
+
+<!ENTITY config.autoAttach.newTabCommand.label_before "Otevřít nový prázdný panel jako">
+<!ENTITY config.autoAttach.newTabCommand.independent "nezávislý panel">
+<!ENTITY config.autoAttach.newTabCommand.child       "potomka současného panelu">
+<!ENTITY config.autoAttach.newTabCommand.sibling     "sourozence současného panelu">
+<!ENTITY config.autoAttach.newTabCommand.nextSibling "blízkého sourozence současného panelu">
+<!ENTITY config.autoAttach.newTabCommand.label_after "">
+
+<!ENTITY config.autoAttach.newTabButton.label_before "Prostřední tlačítko myši na tlačítku "Otevřít nový panel" otevře panel jako">
+<!ENTITY config.autoAttach.newTabButton.independent "nezávislý panel">
+<!ENTITY config.autoAttach.newTabButton.child       "potomka současného panelu">
+<!ENTITY config.autoAttach.newTabButton.sibling     "sourozence současného panelu">
+<!ENTITY config.autoAttach.newTabButton.nextSibling "blízkého sourozence současného panelu">
+<!ENTITY config.autoAttach.newTabButton.label_after "">
+
+<!ENTITY config.autoAttach.duplicateTabCommand.label_before "Prostřední tlačítko myši na tlačítku "Aktualizovat" vytvoří kopii panelu jako">
+<!ENTITY config.autoAttach.duplicateTabCommand.independent "nezávislý panel">
+<!ENTITY config.autoAttach.duplicateTabCommand.child       "potomka původního panelu">
+<!ENTITY config.autoAttach.duplicateTabCommand.sibling     "sourozence původního panelu">
+<!ENTITY config.autoAttach.duplicateTabCommand.nextSibling "blízkého sourozence původního panelu">
+<!ENTITY config.autoAttach.duplicateTabCommand.label_after "">
+
+<!ENTITY config.autoAttach.goButton.label_before "Prostřední tlačítko myši na tlačítku "Přejít na adresu" otevře nový panel jako">
+<!ENTITY config.autoAttach.goButton.independent "nezávislý panel">
+<!ENTITY config.autoAttach.goButton.child       "potomka současného panelu">
+<!ENTITY config.autoAttach.goButton.sibling     "sourozence současného panelu">
+<!ENTITY config.autoAttach.goButton.nextSibling "blízkého sourozence současného panelu">
+<!ENTITY config.autoAttach.goButton.label_after "">
+
+<!ENTITY config.openGroupBookmark.caption     "Chování tlačítka "Otevřít vše v panelech" pro složky záložek">
+<!ENTITY config.openGroupBookmark.ask         "Vždy se dotázat, jak otevřít záložky">
+<!ENTITY config.openGroupBookmark.subtree     "Otevřít jako strom (Doporučené)">
+<!ENTITY config.openGroupBookmark.subtree.type.before  "">
+<!ENTITY config.openGroupBookmark.subtree.type.restore "Obnovit">
+<!ENTITY config.openGroupBookmark.subtree.type.flat    "Ignorovat">
+<!ENTITY config.openGroupBookmark.subtree.type.after   "stromové uspořádání panelů uložené v záložkách">
+<!ENTITY config.openGroupBookmark.flat        "Otevřít v nezávislých panelech (Výchozí)">
+<!ENTITY config.openGroupBookmark.underParent "Uspořádat panely pod skupinový panel (představující složku záložek)">
+
+<!ENTITY config.dropLinksOnTab.caption "Upuštění odkazu, URL adresy, záložky nebo souboru na existující panel">
+<!ENTITY config.dropLinksOnTab.ask     "Vždy se dotázat, jak objekt otevřít">
+<!ENTITY config.dropLinksOnTab.load    "Otevřít v daném panelu (Výchozí)">
+<!ENTITY config.dropLinksOnTab.newTab  "Otevřít jako potomka daného panelu">
+
+
+<!ENTITY config.tabs.autohide "Schování lišty">
+
+<!ENTITY config.autoHide.mode.normal.caption     "v režimu okna">
+<!ENTITY config.autoHide.mode.fullscreen.caption "v režimu celé obrazovky">
+<!ENTITY config.autoHide.mode.0 "Vždy zobrazit lištu panelů">
+<!ENTITY config.autoHide.mode.1 "Automaticky schovat lištu panelů">
+<!ENTITY config.autoHide.mode.2 "Automaticky zmenšit lištu panelů">
+<!ENTITY config.autoShow.caption "Automaticky zobrazit lištu panelů pokud">
+<!ENTITY config.autoShow.mousemove "Kurzor myši je blízko okraje okna nebo lišty panelů">
+<!ENTITY config.autoHide.area.before "Oblast aktivace:">
+<!ENTITY config.autoHide.area.after "pixelů od okraje okna nebo lišty panelů">
+<!ENTITY config.autoHide.delay.before "Zpoždění:">
+<!ENTITY config.autoHide.delay.after "ms">
+<!ENTITY config.autoShow.accelKeyDown "Klávesa Ctrl je stisknuta po určitou dobu">
+<!ENTITY config.autoShow.accelKeyDown.delay.before "Zobrazit lištu po">
+<!ENTITY config.autoShow.accelKeyDown.delay.after  "ms">
+<!ENTITY config.autoShow.tabSwitch   "Panel je přepnut kombinací kláves Ctrl-Tab">
+<!ENTITY config.autoShow.feedback    "Panel je otevřen nebo zavřen">
+<!ENTITY config.autoShow.feedback.delay.before "Opět zmenšit nebo schovat lištu po">
+<!ENTITY config.autoShow.feedback.delay.after  "ms">
+
+
+<!ENTITY config.tabs.tree "Strom">
+
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "Při vytvoření nového stromu sbal ostatní stromy automaticky">
+<!ENTITY config.autoCollapseExpandSubtreeOnSelect "Při přepnutí panelu rozbal jeho strom a sbal ostatní stromy automaticky">
+<!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Kromě přepnutí panelu způsobeném zavřením současného panelu">
+<!ENTITY config.collapseExpandSubtree.dblclick "Sbalit/rozbalit strom dvojklikem">
+<!ENTITY config.autoExpandSubtreeOnAppendChild "Automaticky rozbalit strom, pokud je do něj vložen panel">
+
+<!ENTITY config.closeParentBehavior.caption      "Pokud je rodičovský panel zavřen">
+<!ENTITY config.closeParentBehavior.close        "Zavřít také potomky">
+<!ENTITY config.closeParentBehavior.promoteFirst "Povýšit prvního potomka na rodičovský panel">
+<!ENTITY config.closeParentBehavior.promoteAll   "Povýšit všechny potomky na úroveň rodičovského panelu">
+<!ENTITY config.closeParentBehavior.detach       "Osvobodit potomky z celého stromu">
+<!ENTITY config.closeRootBehavior.promoteFirst   "Povýšit prvního potomka na rodičovský panel, pokud původní rodič sám neměl rodiče">
+
+<!ENTITY config.focusMode "Přepnout na následující/předchozí panel pomocí Ctrl-Tab i přesto, že není vidět">
+
+<!ENTITY config.insertNewChildAt.caption "Umístění nového potomka">
+<!ENTITY config.insertNewChildAt.first "Vložit ho na začátek stromu jako prvního potomka">
+<!ENTITY config.insertNewChildAt.last "Připojit ho za posledním potomkem ve stromě">
+
+<!ENTITY config.undoCloseTabSet.caption  "Pokud je zavřený panel ze stromu obnoven">
+<!ENTITY config.undoCloseTabSet.ask      "Vždy se dotázat">
+<!ENTITY config.undoCloseTabSet.set      "Obnovit celý strom">
+<!ENTITY config.undoCloseTabSet.separate "Obnovit pouze daný panel (Výchozí)">
+
+
+
+<!ENTITY config.tabs.advanced "Pokročilé">
+
+<!ENTITY config.tooltip.includeChildren        "Zobrazit strukturu stromu v bublině nad panely">
+
+<!ENTITY config.bookmarkDroppedTabs.caption "Akce po upuštění rodičovského panelu do záložek">
+<!ENTITY config.bookmarkDroppedTabs.ask     "Vždy se dotázat">
+<!ENTITY config.bookmarkDroppedTabs.all     "Přidat do záložek všechny panely ve stromě">
+<!ENTITY config.bookmarkDroppedTabs.parent  "Přidat do záložek pouze daný panel">
+
+
+
+
+
+<!ENTITY selection.createSubtree.label          "Uspořádat do nového stromu">
+<!ENTITY selection.createSubtree.accesskey      "u">
+
+<!ENTITY selection.removeTabSubtree.label       "Zavřít vybrané stromy">
+<!ENTITY selection.removeTabSubtree.accesskey   "z">
+<!ENTITY context.reloadTabSubtree.label         "Obnovit strom">
+<!ENTITY context.reloadTabSubtree.accesskey     "n">
+<!ENTITY context.reloadDescendantTabs.label     "Obnovit potomky">
+<!ENTITY context.reloadDescendantTabs.accesskey "v">
+<!ENTITY context.removeTabSubtree.label         "Zavřít strom">
+<!ENTITY context.removeTabSubtree.accesskey     "v">
+<!ENTITY context.removeDescendantTabs.label     "Zavřít potomky">
+<!ENTITY context.removeDescendantTabs.accesskey "t">
+<!ENTITY context.removeAllTabsBut.label         "Zavřít ostatní panely mimo tento strom">
+<!ENTITY context.removeAllTabsBut.accesskey     "o">
+<!ENTITY context.collapseAllSubtree.label       "Sbalit všechny stromy">
+<!ENTITY context.collapseAllSubtree.accesskey   "S">
+<!ENTITY context.expandAllSubtree.label         "Rozbalit všechny stromy">
+<!ENTITY context.expandAllSubtree.accesskey     "R">
+<!ENTITY context.toggleAutoHide.label           "Schovávat lištu panelů">
+<!ENTITY context.toggleAutoHide.accesskey       "l">
+<!ENTITY context.toggleFixed.label              "Ustálit umístění a šířku/výšku lišty panelů">
+<!ENTITY context.toggleFixed.label.horizontal   "Ustálit umístění a výšku lišty panelů">
+<!ENTITY context.toggleFixed.label.vertical     "Ustálit umístění a šířku lišty panelů">
+<!ENTITY context.toggleFixed.accesskey          "U">
+<!ENTITY context.bookmarkTabSubtree.label       "Přidat strom do záložek...">
+<!ENTITY context.bookmarkTabSubtree.accesskey   "P">
+
+<!ENTITY group.default "Nová skupina">
+<!ENTITY group.temporary "Dočasná skupina">
diff --git a/locale/cs/treestyletab/treestyletab.properties b/locale/cs/treestyletab/treestyletab.properties
new file mode 100644
index 0000000..ae9b303
--- /dev/null
+++ b/locale/cs/treestyletab/treestyletab.properties
@@ -0,0 +1,55 @@
+tooltip.collapseSubtree=Sbalit strom
+tooltip.collapseSubtree.labeled=Sbalit strom:\n%S
+tooltip.expandSubtree=Rozbalit strom
+tooltip.expandSubtree.labeled=Rozbalit strom:\n%S
+tooltip.closeTree=Zavřít strom
+tooltip.closeTree.labeled=Zavřít strom:\n%S
+tooltip.item.label=%2$S* %1$S
+tooltip.more=...a další %1$S panely
+
+dropLinkOnTab.title=Jak chcete otevřít tento odkaz?
+dropLinkOnTab.text=Odkaz byl upuštěn na panel. Tree Style Tab může otevřít tento odkaz jako potomka tohoto panelu. Co si přejete udělat?
+dropLinkOnTab.never=Příště se nedotazovat a provést moji volbu automaticky
+dropLinkOnTab.loadInTheTab=Otevřít v tomto panelu (Výchozí)
+dropLinkOnTab.openNewChildTab=Otevřít jako potomka tohoto panelu
+
+openGroupBookmarkBehavior.title=Jak chcete otevřít tyto záložky?
+openGroupBookmarkBehavior.text=Záložky budou otevřeny v několika panelech. Co si přejete udělat?
+openGroupBookmarkBehavior.never=Příště se nedotazovat a provést moji volbu automaticky
+openGroupBookmarkBehavior.subTree=Otevřít jako nový strom
+openGroupBookmarkBehavior.separate=Otevřít v nezávislých panelech (Výchozí)
+openGroupBookmarkBehavior.replace=Nahradit současný panel
+
+bookmarkDroppedTabs.title=Jak chcete přidat strom panelů do záložek?
+bookmarkDroppedTabs.text=Upuštěný panel má potomky. Co si přejete udělat?
+bookmarkDroppedTabs.never=Příště se nedotazovat a provést moji volbu automaticky
+bookmarkDroppedTabs.bookmarkAll=Přidat do záložek všechny panely ve stromě
+bookmarkDroppedTabs.bookmarkOnlyParent=Přidat do záložek pouze daný panel
+
+undoCloseTabSetBehavior.label=Obnovovaný panel byl zavřen společně s dalšími %S panely ze stejného stromu. Přejete si obnovit i tyto panely?
+undoCloseTabSetBehavior.restoreOnce=Obnovit i tyto panely
+undoCloseTabSetBehavior.restoreForever=Vždy obnovit i tyto panely
+undoCloseTabSetBehavior.ignoreForever=Nikdy neobnovovat tyto panely
+
+openSelectedPlaces.bookmarks=z %2$S záložek, včetně "%1$S"
+openSelectedPlaces.history=z %2$S položek v historii, včetně "%1$S"
+
+bookmarkProperty.parent.label=Rodičovský panel:
+bookmarkProperty.parent.blank.label=(žádný)
+bookmarkProperty.parent.current.label=[ %S ]
+
+undo_changeTabbarPosition_label=Změna umístění lišty panelů
+
+toolbarCustomizing_tabbar_horizontal=Tato nástrojová lišta se stane lištou panelů.
+toolbarCustomizing_tabbar_vertical=Tato nástrojová lišta se stane svislou lištou panelů.
+
+
+compatibility_STM_warning_title=Super Tab Mode a Tree Style Tab jsou konfliktní doplňky
+compatibility_STM_warning_text=Panely otevřené z odkazů (nebo jinak) se nestanou potomkem současného panelu, protože umístění nových panelů je určeno doplňkem Super Tab Mode. Jakou variantu si přejete používat?\n(*Toto nastavení můžete měnit ručně v nastavení doplňku Super Tab Mode.)
+compatibility_STM_warning_use_TST=Umisťovat panely jako potomky současného panelu
+compatibility_STM_warning_use_STM=Umisťovat panely dle nastavení doplňku Super Tab Mode
+compatibility_STM_warning_never=Příště se nedotazovat.
+
+
+closeTabsToTheEnd_vertical_label=Zavřít panely dole
+closeTabsToTheEnd_vertical_accesskey=t
diff --git a/locale/da-DK/treestyletab/treestyletab.dtd b/locale/da-DK/treestyletab/treestyletab.dtd
index fa4f94e..19d8412 100644
--- a/locale/da-DK/treestyletab/treestyletab.dtd
+++ b/locale/da-DK/treestyletab/treestyletab.dtd
@@ -130,6 +130,7 @@
 
 <!ENTITY config.tabs.tree "Træet">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "Udvid tilhørende træ når en fane vælges, og sammenfold automatisk de andre">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Ekskluder fokusflytning forårsaget af af aktuel fanes lukning">
 <!ENTITY config.collapseExpandSubtree.dblclick "Dobbeltklik på en fane for at sammenfolde/udvide træ">
diff --git a/locale/de-DE/treestyletab/treestyletab.dtd b/locale/de-DE/treestyletab/treestyletab.dtd
index 540c49a..631852c 100644
--- a/locale/de-DE/treestyletab/treestyletab.dtd
+++ b/locale/de-DE/treestyletab/treestyletab.dtd
@@ -130,6 +130,7 @@
 
 <!ENTITY config.tabs.tree "Verhalten">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "Nicht aktive Zweige zuklappen">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Keine Fokusänderung beim Schließen des aktiven Tabs">
 <!ENTITY config.collapseExpandSubtree.dblclick "Bei Doppelklick auf Tab untergeordneten Zweig auf- oder zuklappen">
diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd
index 2d67053..e3bd0ab 100644
--- a/locale/en-US/treestyletab/treestyletab.dtd
+++ b/locale/en-US/treestyletab/treestyletab.dtd
@@ -116,6 +116,7 @@
 
 <!ENTITY config.tabs.tree "Tree">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "When a tab gets focus, expand its tree and collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Exclude focus moving caused by current tab closing">
 <!ENTITY config.collapseExpandSubtree.dblclick "Double-click on a tab to collapse/expand tree">
diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd
index 1718a4e..2cfee79 100644
--- a/locale/es-ES/treestyletab/treestyletab.dtd
+++ b/locale/es-ES/treestyletab/treestyletab.dtd
@@ -125,6 +125,7 @@
 
 <!ENTITY config.tabs.tree "Arbol">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!--ENTITY config.autoCollapseExpandSubtreeOnSelect "Colapsar otros árboles automáticamente cuando una pestaña es abierta o seleccionada"-->
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "Cuando una pestaña obtiene foco, expandir su árbol y colapsar los otros automáticamente">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Excluir movimiento de foco causado por el cierre de la pestaña en foco">
diff --git a/locale/fr-FR/treestyletab/treestyletab.dtd b/locale/fr-FR/treestyletab/treestyletab.dtd
index c9c4d78..4dcb062 100644
--- a/locale/fr-FR/treestyletab/treestyletab.dtd
+++ b/locale/fr-FR/treestyletab/treestyletab.dtd
@@ -117,6 +117,7 @@
 
 <!ENTITY config.tabs.tree "Arborescence">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "Lorsqu'un onglet devient actif, déplier son arborescence et replier les autres automatiquement">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Exclure le changement d'activation par la fermeture de l'onglet actuel">
 <!ENTITY config.collapseExpandSubtree.dblclick "Double-cliquer sur un onglet pour replier/déplier l'arborescence">
diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd
index 73fdcd2..78cf62b 100644
--- a/locale/it-IT/treestyletab/treestyletab.dtd
+++ b/locale/it-IT/treestyletab/treestyletab.dtd
@@ -125,6 +125,7 @@
 
 <!ENTITY config.tabs.tree "Tree">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!--ENTITY config.autoCollapseExpandSubtreeOnSelect "Contrai automaticamente gli altri sottoalberi quando viene aperta o selezionata una scheda"-->
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "When a tab gets focus, expand his tree and collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Exclude focus moving caused by current tab closing">
diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd
index 106d279..3a21030 100644
--- a/locale/ja/treestyletab/treestyletab.dtd
+++ b/locale/ja/treestyletab/treestyletab.dtd
@@ -117,6 +117,7 @@
 
 <!ENTITY config.tabs.tree "ツリー">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "新しいツリーが作られた時は、自動的に他のツリーを折り畳む">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "タブを切り替えた時は、フォーカスされたタブのツリーを自動的に展開して、他のツリーを折り畳む">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "現在のタブを閉じてタブのフォーカスが切り替わった場合は何もしない">
 
diff --git a/locale/pl/treestyletab/treestyletab.dtd b/locale/pl/treestyletab/treestyletab.dtd
index ec698c6..5bf988d 100644
--- a/locale/pl/treestyletab/treestyletab.dtd
+++ b/locale/pl/treestyletab/treestyletab.dtd
@@ -125,6 +125,7 @@
 
 <!ENTITY config.tabs.tree "Drzewo">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "Rozwijaj drzewo wybranej karty i zwijaj pozostałe">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Z wyjątkiem, gdy wybór się zmieni na skutek zamknięcia aktywnej karty">
 <!ENTITY config.collapseExpandSubtree.dblclick "Zwijaj/rozwijaj drzewo po dwukrotnym kliknięciu etykiety karty">
diff --git a/locale/ru/treestyletab/treestyletab.dtd b/locale/ru/treestyletab/treestyletab.dtd
index 25f301e..e786b2a 100755
--- a/locale/ru/treestyletab/treestyletab.dtd
+++ b/locale/ru/treestyletab/treestyletab.dtd
@@ -123,6 +123,7 @@
 
 <!ENTITY config.tabs.tree "Дерево">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "При появлении нового дерева автоматически свернуть остальные">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "При выборе вкладки развернуть её дерево и автоматически свернуть остальные">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Исключая выбор вкладки после закрытия текущей вкладки">
 <!ENTITY config.collapseExpandSubtree.dblclick "Сворачивать/разворачивать дерево вкладок по двойному клику">
diff --git a/locale/sv-SE/treestyletab/treestyletab.dtd b/locale/sv-SE/treestyletab/treestyletab.dtd
index 273572d..af8f972 100644
--- a/locale/sv-SE/treestyletab/treestyletab.dtd
+++ b/locale/sv-SE/treestyletab/treestyletab.dtd
@@ -129,6 +129,7 @@
 
 <!ENTITY config.tabs.tree "Träd">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "När en flik får fokus, expandera dess träd och minimera andra träd automatiskt">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "Inaktivera flytt av fokus orsakad av att aktuell flik stängs">
 <!ENTITY config.collapseExpandSubtree.dblclick "Dubbelklicka på en flik för att minimera/expandera trädet">
diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd
index 426efe0..a5d581f 100644
--- a/locale/zh-CN/treestyletab/treestyletab.dtd
+++ b/locale/zh-CN/treestyletab/treestyletab.dtd
@@ -129,6 +129,7 @@
 
 <!ENTITY config.tabs.tree "树状结构">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "某一标签获得焦点时,自动展开该标签子树并折叠其他标签树">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "当前标签关闭引起的焦点转移除外">
 <!ENTITY config.collapseExpandSubtree.dblclick "通过双击折叠/展开标签的子树">
diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd
index 1e3c0a4..ac63530 100644
--- a/locale/zh-TW/treestyletab/treestyletab.dtd
+++ b/locale/zh-TW/treestyletab/treestyletab.dtd
@@ -117,6 +117,7 @@
 
 <!ENTITY config.tabs.tree "樹狀結構">
 
+<!ENTITY config.autoCollapseExpandSubtreeOnAttach "When a new tree appears, collapse others automatically">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect "切換分頁時,自動展開該子樹,並摺疊無關的分頁">
 <!ENTITY config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove "不包括關閉當前分頁造成的切換">
 
diff --git a/modules/autoHide.js b/modules/autoHide.js
index 52bb84d..effbdec 100644
--- a/modules/autoHide.js
+++ b/modules/autoHide.js
@@ -850,9 +850,9 @@ AutoHideBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.treeStyleTab.fireDataContainerEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGING, this.browser, true, false, data);
+		this.treeStyleTab.fireCustomEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGING, this.browser, true, false, data);
 		// for backward compatibility
-		this.treeStyleTab.fireDataContainerEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGING.replace(/^nsDOM/, ''), this.browser, true, false, data);
+		this.treeStyleTab.fireCustomEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGING.replace(/^nsDOM/, ''), this.browser, true, false, data);
 	},
  
 	fireStateChangeEvent : function AHB_fireStateChangeEvent() 
@@ -865,9 +865,9 @@ AutoHideBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.treeStyleTab.fireDataContainerEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGE, this.browser, true, false, data);
+		this.treeStyleTab.fireCustomEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGE, this.browser, true, false, data);
 		// for backward compatibility
-		this.treeStyleTab.fireDataContainerEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGE.replace(/^nsDOM/, ''), this.browser, true, false, data);
+		this.treeStyleTab.fireCustomEvent(this.treeStyleTab.kEVENT_TYPE_AUTO_HIDE_STATE_CHANGE.replace(/^nsDOM/, ''), this.browser, true, false, data);
 	},
   
 	
@@ -1012,19 +1012,19 @@ AutoHideBrowser.prototype = {
 				return;
 
 			case this.treeStyleTab.kEVENT_TYPE_TAB_FOCUS_SWITCHING_KEY_DOWN:
-				return this.onKeyDown(aEvent.getData('sourceEvent'));
+				return this.onKeyDown(aEvent.detail.sourceEvent);
 
 			case this.treeStyleTab.kEVENT_TYPE_TAB_FOCUS_SWITCHING_START:
 				this.cancelDelayedShowForShortcut();
 				if (this.enabled &&
 					utils.getTreePref('tabbar.autoShow.tabSwitch') &&
 					(
-						aEvent.getData('scrollDown') ||
-						aEvent.getData('scrollUp') ||
+						aEvent.detail.scrollDown ||
+						aEvent.detail.scrollUp ||
 						( // when you release "shift" key
 							this.expanded &&
-							aEvent.getData('standBy') &&
-							aEvent.getData('onlyShiftKey')
+							aEvent.detail.standBy &&
+							aEvent.detail.onlyShiftKey
 						)
 					))
 					this.show(this.kSHOWN_BY_SHORTCUT);
diff --git a/modules/base.js b/modules/base.js
index ae2a7a7..640292f 100644
--- a/modules/base.js
+++ b/modules/base.js
@@ -43,6 +43,7 @@ const Cu = Components.utils;
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import('resource://gre/modules/Timer.jsm');
+Cu.import('resource://treestyletab-modules/lib/inherit.jsm');
 Cu.import('resource://treestyletab-modules/constants.js');
 
 XPCOMUtils.defineLazyGetter(this, 'window', function() {
@@ -83,8 +84,7 @@ else {
 	this.AeroPeek = null;
 }
  
-var TreeStyleTabBase = { 
-	__proto__ : TreeStyleTabConstants,
+var TreeStyleTabBase = inherit(TreeStyleTabConstants, { 
 	
 	tabsHash : null, 
 	inWindowDestoructionProcess : false,
@@ -724,9 +724,9 @@ var TreeStyleTabBase = {
 	},
 	
 	// called with target(nsIDOMEventTarget), document(nsIDOMDocument), type(string) and data(object) 
-	fireDataContainerEvent : function TSTBase_fireDataContainerEvent(...aArgs)
+	fireCustomEvent : function TSTBase_fireCustomEvent(...aArgs)
 	{
-		var target, document, type, data, canBubble, cancellable;
+		var target, document, type, data, canBubble, cancelable;
 		for (let i = 0, maxi = aArgs.length; i < maxi; i++)
 		{
 			let arg = aArgs[i];
@@ -734,7 +734,7 @@ var TreeStyleTabBase = {
 				if (canBubble === void(0))
 					canBubble = arg;
 				else
-					cancellable = arg;
+					cancelable = arg;
 			}
 			else if (typeof arg == 'string')
 				type = arg;
@@ -750,17 +750,11 @@ var TreeStyleTabBase = {
 		if (!document)
 			document = target.ownerDocument || target;
 
-		var event = document.createEvent('DataContainerEvent');
-		event.initEvent(type, canBubble, cancellable);
-		var properties = Object.keys(data);
-		for (let i = 0, maxi = properties.length; i < maxi; i++)
-		{
-			let property = properties[i];
-			let value = data[property];
-			event.setData(property, value);
-			event[property] = value; // for backward compatibility
-		}
-
+		var event = new this.window.CustomEvent(type, {
+			bubbles    : canBubble,
+			cancelable : cancelable,
+			detail     : data
+		});
 		return target.dispatchEvent(event);
 	},
  
@@ -1104,6 +1098,19 @@ var TreeStyleTabBase = {
 			).booleanValue;
 	},
  
+	getTabFromBrowser : function TSTBase_getTabFromBrowser(aBrowser, aTabBrowser) 
+	{
+		var b = aTabBrowser || this.browser;
+		var tabs = this.getAllTabs(b);
+		for (let i = 0, maxi = tabs.length; i < maxi; i++)
+		{
+			let tab = tabs[i];
+			if (tab.linkedBrowser == aBrowser)
+				return tab;
+		}
+		return null;
+	},
+ 
 	getTabFromFrame : function TSTBase_getTabFromFrame(aFrame, aTabBrowser) 
 	{
 		var b = aTabBrowser || this.browser;
@@ -2560,7 +2567,7 @@ var TreeStyleTabBase = {
 		}
 	}
    
-}; 
+}); 
   
 TreeStyleTabBase.init(); 
  
diff --git a/modules/browser.js b/modules/browser.js
index 980eead..0009988 100644
--- a/modules/browser.js
+++ b/modules/browser.js
@@ -44,6 +44,7 @@ const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
+Cu.import('resource://treestyletab-modules/lib/inherit.jsm');
 
 XPCOMUtils.defineLazyModuleGetter(this, 'Services', 'resource://gre/modules/Services.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'utils', 'resource://treestyletab-modules/utils.js', 'TreeStyleTabUtils');
@@ -87,8 +88,7 @@ function TreeStyleTabBrowser(aWindowService, aTabBrowser)
 	this._treeViewEnabled = true;
 }
  
-TreeStyleTabBrowser.prototype = { 
-	__proto__ : TreeStyleTabWindow.prototype,
+TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { 
 	
 	kMENUITEM_RELOADSUBTREE            : 'context-item-reloadTabSubtree', 
 	kMENUITEM_RELOADCHILDREN           : 'context-item-reloadDescendantTabs',
@@ -965,13 +965,16 @@ TreeStyleTabBrowser.prototype = {
 
 		aTab.__treestyletab__linkedTabBrowser = this.mTabBrowser;
 
-		/**
-		 * XXX dirty hack!!! there is no way to know when the tab is readied to be restored...
-		 */
 		if (!aTab.linkedBrowser.__treestyletab__toBeRestored)
 			aTab.linkedBrowser.__treestyletab__toBeRestored = utils.isTabNotRestoredYet(aTab);
+
+		/**
+		 * XXX Dirty hack for Firefox 28 and older, because
+		 * there is no way to know when the tab is readied to be restored...
+		 */
 		var b = aTab.linkedBrowser;
-		if (!b.__treestyletab__stop) {
+		if (!utils.shouldUseMessageManager && !b.__treestyletab__stop) {
+			let self = this;
 			b.__treestyletab__stop = b.stop;
 			b.stop = function TSTBrowser_stopHook(...aArgs) {
 				try {
@@ -979,8 +982,9 @@ TreeStyleTabBrowser.prototype = {
 					while (stack)
 					{
 						if (stack.name == 'sss_restoreHistoryPrecursor' ||
-							stack.name == 'ssi_restoreHistoryPrecursor') {
-							this.__treestyletab__toBeRestored = true;
+							stack.name == 'ssi_restoreHistoryPrecursor' ||
+							stack.filename == 'resource:///modules/sessionstore/SessionStore.jsm') {
+							self.onRestoreTabContentStarted(aTab);
 							break;
 						}
 						stack = stack.caller;
@@ -1639,9 +1643,9 @@ TreeStyleTabBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(type, this.mTabBrowser, true, false, data);
+		this.fireCustomEvent(type, this.mTabBrowser, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(type.replace(/^nsDOM/, ''), this.mTabBrowser, true, false, data);
+		this.fireCustomEvent(type.replace(/^nsDOM/, ''), this.mTabBrowser, true, false, data);
 
 		return true;
 	},
@@ -1782,9 +1786,9 @@ TreeStyleTabBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGING, this.mTabBrowser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGING, this.mTabBrowser, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGING.replace(/^nsDOM/, ''), this.mTabBrowser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGING.replace(/^nsDOM/, ''), this.mTabBrowser, true, false, data);
 
 		return true;
 	},
@@ -1804,9 +1808,9 @@ TreeStyleTabBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGED, this.mTabBrowser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGED, this.mTabBrowser, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGED.replace(/^nsDOM/, ''), this.mTabBrowser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TABBAR_STATE_CHANGED.replace(/^nsDOM/, ''), this.mTabBrowser, true, false, data);
 
 		return true;
 	},
@@ -3266,7 +3270,8 @@ TreeStyleTabBrowser.prototype = {
   
 	onTabsClosing : function TSTBrowser_onTabsClosing(aEvent) 
 	{
-		var tabs = aEvent.tabs || aEvent.getData('tabs');
+		var tabs = aEvent.detail && aEvent.detail.tabs ||
+					aEvent.getData('tabs') // for backward compatibility;
 		var b = this.getTabBrowserFromChild(tabs[0]);
 
 		var trees = this.splitTabsToSubtrees(tabs);
@@ -3673,6 +3678,11 @@ TreeStyleTabBrowser.prototype = {
 		return group.id;
 	},
   
+	onRestoreTabContentStarted : function TSTBrowser_onRestoreTabContentStarted(aTab)
+	{
+		aTab.linkedBrowser.__treestyletab__toBeRestored = true;
+	},
+ 
 	onTabRestoring : function TSTBrowser_onTabRestoring(aEvent) 
 	{
 		this.restoreTree();
@@ -3794,8 +3804,10 @@ TreeStyleTabBrowser.prototype = {
 				this.collapseExpandSubtree(aTab, isSubtreeCollapsed);
 		}
 
-		if (mayBeDuplicated)
-			this.clearRedirectionTable();
+		if (mayBeDuplicated) {
+			this.clearRedirectionTableWithDelay();
+			this.clearRedirectbTabRelationsWithDelay(aTab);
+		}
 
 		delete aTab.__treestyletab__restoreState;
 	},
@@ -4105,7 +4117,7 @@ TreeStyleTabBrowser.prototype = {
 	},
 	_redirectionTable : {},
  
-	clearRedirectionTable : function TSTBrowser_clearRedirectionTable() 
+	clearRedirectionTableWithDelay : function TSTBrowser_clearRedirectionTableWithDelay() 
 	{
 		if (this._clearRedirectionTableTimer) {
 			this.window.clearTimeout(this._clearRedirectionTableTimer);
@@ -4117,6 +4129,79 @@ TreeStyleTabBrowser.prototype = {
 	},
 	_clearRedirectionTableTimer : null,
  
+	clearRedirectbTabRelationsWithDelay : function TSTBrowser_clearRedirectbTabRelationsWithDelay(aTab) 
+	{
+		if (aTab._clearRedirectbTabRelationsTimer) {
+			this.window.clearTimeout(aTab._clearRedirectbTabRelationsTimer);
+			aTab._clearRedirectbTabRelationsTimer = null;
+		}
+		aTab._clearRedirectbTabRelationsTimer = this.window.setTimeout(function(aSelf) {
+			aSelf.clearRedirectbTabRelations(aTab);
+			delete aTab._clearRedirectbTabRelationsTimer;
+		}, 1500, this);
+	},
+	clearRedirectbTabRelations : function TSTBrowser_clearRedirectbTabRelations(aTab) 
+	{
+		if (!aTab || !aTab.parentNode)
+			return;
+
+		var redirectingIds = Object.keys(this._redirectionTable).map(function(aId) {
+			return this._redirectionTable[aId];
+		}, this);
+		var existingIds = this.getAllTabs(this.mTabBrowser).map(function(aTab) {
+			return this.getTabValue(aTab, this.kID);
+		}, this);
+		var validIds = redirectingIds.concat(existingIds);
+		validIds = validIds.filter(function(aId) {
+			return !!aId;
+		});
+
+		var ancestors = this.getTabValue(aTab, this.kANCESTORS);
+		if (ancestors) {
+			ancestors = ancestors.split('|');
+			let actualAncestors = this.getAncestorTabs(aTab).map(function(aTab) {
+				return aTab.getAttribute(this.kID);
+			}, this);
+			ancestors = ancestors.filter(function(aAncestor) {
+				if (actualAncestors.indexOf(aAncestor) < 0)
+					return false;
+				else
+					return validIds.indexOf(aAncestor) > -1;
+			}, this);
+			if (ancestors.length)
+				this.setTabValue(aTab, this.kANCESTORS, ancestors.join('|'));
+			else
+				this.deleteTabValue(aTab, this.kANCESTORS);
+		}
+
+		var children = this.getTabValue(aTab, this.kCHILDREN);
+		if (children) {
+			children = children.split('|');
+			children = children.filter(function(aChild) {
+				if (this.getParentTab(this.getTabById(aChild)) != aTab)
+					return false;
+				else
+					return validIds.indexOf(aChild) > -1;
+			}, this);
+			if (children.length)
+				this.setTabValue(aTab, this.kCHILDREN, children.join('|'));
+			else
+				this.deleteTabValue(aTab, this.kCHILDREN);
+		}
+
+		var restoringChildren = aTab.getAttribute(this.kCHILDREN_RESTORING);
+		if (restoringChildren) {
+			restoringChildren = restoringChildren.split('|');
+			restoringChildren = restoringChildren.filter(function(aChild) {
+				return validIds.indexOf(aChild) > -1;
+			}, this);
+			if (restoringChildren.length)
+				aTab.setAttribute(this.kCHILDREN_RESTORING, restoringChildren.join('|'));
+			else
+				aTab.removeAttribute(this.kCHILDREN_RESTORING);
+		}
+	},
+ 
 	restoreClosedSet : function TSTBrowser_restoreClosedSet(aId, aRestoredTab) 
 	{
 		var behavior = this.undoCloseTabSetBehavior;
@@ -4653,6 +4738,27 @@ TreeStyleTabBrowser.prototype = {
 		var isContentResize = resizedTopFrame == this.mTabBrowser.contentWindow;
 		var isChromeResize = resizedTopFrame == this.window;
 
+		if (isChromeResize && aEvent.originalTarget != resizedTopFrame) {
+			// ignore resizing of sub frames in "position:fixed" box
+			let target = aEvent.target;
+			try {
+				let node = target.QueryInterface(Ci.nsIInterfaceRequestor)
+								.getInterface(Ci.nsIWebNavigation)
+								.QueryInterface(Ci.nsIDocShell)
+								.chromeEventHandler;
+				let root = node.ownerDocument.documentElement;
+				while (node && node != root) {
+					if (node.boxObject && !node.boxObject.parentBox) {
+						isChromeResize = false;
+						break;
+					}
+					node = node.parentNode;
+				}
+			}
+			catch(e) {
+			}
+		}
+
 		// Ignore events when a background tab raises to the foreground.
 		if (isContentResize && this._lastTabbarPlaceholderSize) {
 			let newSize = this.getTabbarPlaceholderSize();
@@ -5113,9 +5219,11 @@ TreeStyleTabBrowser.prototype = {
 			this.collapseExpandSubtree(aParent, false, aInfo.dontAnimate);
 		}
 		else if (!aInfo.dontExpand) {
+			if (utils.getTreePref('autoCollapseExpandSubtreeOnAttach') &&
+				this.shouldTabAutoExpanded(aParent))
+				this.collapseExpandTreesIntelligentlyFor(aParent);
+
 			if (utils.getTreePref('autoCollapseExpandSubtreeOnSelect')) {
-				if (this.shouldTabAutoExpanded(aParent))
-					this.collapseExpandTreesIntelligentlyFor(aParent);
 				newAncestors.forEach(function(aAncestor) {
 					if (this.shouldTabAutoExpanded(aAncestor))
 						this.collapseExpandSubtree(aAncestor, false, aInfo.dontAnimate);
@@ -5156,9 +5264,9 @@ TreeStyleTabBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_ATTACHED, aChild, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_ATTACHED, aChild, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_ATTACHED.replace(/^nsDOM/, ''), aChild, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_ATTACHED.replace(/^nsDOM/, ''), aChild, true, false, data);
 	},
 	
 	shouldTabAutoExpanded : function TSTBrowser_shouldTabAutoExpanded(aTab) 
@@ -5206,9 +5314,9 @@ TreeStyleTabBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_DETACHED, aChild, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_DETACHED, aChild, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_DETACHED.replace(/^nsDOM/, ''), aChild, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_DETACHED.replace(/^nsDOM/, ''), aChild, true, false, data);
 
 		if (this.isTemporaryGroupTab(parentTab) && !this.hasChildTabs(parentTab)) {
 			this.window.setTimeout(function(aTabBrowser) {
@@ -5267,29 +5375,26 @@ TreeStyleTabBrowser.prototype = {
 				this.detachTab(tab, aInfo);
 				if (i == 0) {
 					if (parentTab) {
-						this.attachTabTo(tab, parentTab, {
-							__proto__  : aInfo,
+						this.attachTabTo(tab, parentTab, inherit(aInfo, {
 							dontExpand : true,
 							dontMove   : true
-						});
+						}));
 					}
 					this.collapseExpandSubtree(tab, false);
 					this.deleteTabValue(tab, this.kSUBTREE_COLLAPSED);
 				}
 				else {
-					this.attachTabTo(tab, children[0], {
-						__proto__  : aInfo,
+					this.attachTabTo(tab, children[0], inherit(aInfo, {
 						dontExpand : true,
 						dontMove   : true
-					});
+					}));
 				}
 			}
 			else if (aInfo.behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN && parentTab) {
-				this.attachTabTo(tab, parentTab, {
-					__proto__  : aInfo,
+				this.attachTabTo(tab, parentTab, inherit(aInfo, {
 					dontExpand : true,
 					dontMove   : true
-				});
+				}));
 			}
 			else { // aInfo.behavior == this.kCLOSE_PARENT_BEHAVIOR_SIMPLY_DETACH_ALL_CHILDREN
 				this.detachTab(tab, aInfo);
@@ -5442,7 +5547,7 @@ TreeStyleTabBrowser.prototype = {
 		}
 
 		var self = this;
-		var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style);
+		var CSSTransitionEnabled = ('transition' in aTab.style || 'MozTransition' in aTab.style);
 		if (CSSTransitionEnabled) {
 			aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) {
 				delete aTab.__treestyletab__updateTabIndentTask;
@@ -5995,9 +6100,9 @@ TreeStyleTabBrowser.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_COLLAPSED_STATE_CHANGED, aTab, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TAB_COLLAPSED_STATE_CHANGED, aTab, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_COLLAPSED_STATE_CHANGED.replace(/^nsDOM/, ''), aTab, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TAB_COLLAPSED_STATE_CHANGED.replace(/^nsDOM/, ''), aTab, true, false, data);
 
 		var b = this.mTabBrowser;
 		var parent;
@@ -6036,7 +6141,7 @@ TreeStyleTabBrowser.prototype = {
 
 		aTab.setAttribute(this.kCOLLAPSING_PHASE, aCollapsed ? this.kCOLLAPSING_PHASE_TO_BE_COLLAPSED : this.kCOLLAPSING_PHASE_TO_BE_EXPANDED );
 
-		var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style);
+		var CSSTransitionEnabled = ('transition' in aTab.style || 'MozTransition' in aTab.style);
 
 		var maxMargin;
 		var offsetAttr;
@@ -6725,5 +6830,5 @@ TreeStyleTabBrowser.prototype = {
 	delayedShowTabbarForFeedback : function TSTBrowser_delayedShowTabbarForFeedback() { this.autoHide.delayedShowForFeedback(); },
 	cancelHideTabbarForFeedback : function TSTBrowser_cancelHideTabbarForFeedback() { this.autoHide.cancelHideForFeedback(); }
   
-}; 
+}); 
  
diff --git a/modules/browserUIShowHideObserver.js b/modules/browserUIShowHideObserver.js
index 3ba3cdb..48075b5 100644
--- a/modules/browserUIShowHideObserver.js
+++ b/modules/browserUIShowHideObserver.js
@@ -73,7 +73,7 @@ BrowserUIShowHideObserver.prototype = {
 					return;
 
 				case 'attributes':
-					this.onAttributeModified(this.box, aMutations, aObserver);
+					this.onAttributeModified(this.box, aMutation, aObserver);
 					return;
 			}
 		}, this);
@@ -99,13 +99,15 @@ BrowserUIShowHideObserver.prototype = {
 
 			var self = this;
 			observer = new this.MutationObserver(function(aMutations, aObserver) {
-				self.onAttributeModified(aChild, aMutations, aObserver);
+				aMutations.forEach(function(aMutation) {
+					self.onAttributeModified(aChild, aMutation, aObserver);
+				});
 			});
 			observer.observe(aChild, { attributes : true });
 			aChild.__treestyletab__attributeObserver = observer;
 		}, this)
 	},
-	onAttributeModified : function BrowserUIShowHideObserver_onAttributeModified(aTargetElement, aMutations, aObserver) 
+	onAttributeModified : function BrowserUIShowHideObserver_onAttributeModified(aTargetElement, aMutation, aObserver) 
 	{
 		var TST = this.owner.browser.treeStyleTab;
 		if (
@@ -121,16 +123,12 @@ BrowserUIShowHideObserver.prototype = {
 			)
 			return;
 
-		aMutations.forEach(function(aMutation) {
-			if (aMutation.type != 'attributes')
-				return;
-			if (aMutation.attributeName == 'hidden' ||
-				aMutation.attributeName == 'collapsed' ||
-				aMutation.attributeName == 'moz-collapsed' || // Used in full screen mode
-				aMutation.attributeName == 'disablechrome') {
-				TST.updateFloatingTabbar(TreeStyleTabConstants.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
-			}
-		}, this);
+		if (aMutation.attributeName == 'hidden' ||
+			aMutation.attributeName == 'collapsed' ||
+			aMutation.attributeName == 'moz-collapsed' || // Used in full screen mode
+			aMutation.attributeName == 'disablechrome') {
+			TST.updateFloatingTabbar(TreeStyleTabConstants.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
+		}
 	},
  
 	destroyChildrenObserver : function BrowserUIShowHideObserver_destroyChildrenObserver(aParent) 
diff --git a/modules/fullTooltip.js b/modules/fullTooltip.js
index 95bfe5d..1dbdd9c 100644
--- a/modules/fullTooltip.js
+++ b/modules/fullTooltip.js
@@ -14,7 +14,7 @@
  * The Original Code is the Tree Style Tab.
  *
  * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2011-2013
+ * Portions created by the Initial Developer are Copyright (C) 2011-2014
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
@@ -41,6 +41,7 @@ const Ci = Components.interfaces;
 
 Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
 
+Components.utils.import('resource://treestyletab-modules/lib/inherit.jsm');
 Components.utils.import('resource://treestyletab-modules/base.js');
 Components.utils.import('resource://treestyletab-modules/pseudoTreeBuilder.js');
 
@@ -53,8 +54,7 @@ function FullTooltipManager(aOwner)
 {
 	this.init(aOwner);
 }
-FullTooltipManager.prototype = {
-	__proto__ : TreeStyleTabBase,
+FullTooltipManager.prototype = inherit(TreeStyleTabBase, {
 
 	kTOOLTIP_MODE_DEFAULT   : 0,
 	kTOOLTIP_MODE_COLLAPSED : 1,
@@ -162,11 +162,11 @@ FullTooltipManager.prototype = {
 
 	onItemClick : function FTM_onItemClick(aEvent)
 	{
-		var id = aEvent.getData('id');
+		var id = aEvent.detail.id;
 		if (id) {
 			let tab = this.getTabById(id, this.owner.browser);
 			if (tab) {
-				let event = aEvent.getData('sourceEvent');
+				let event = aEvent.detail.sourceEvent;
 				if (event.button == 1 ||
 					(event.button == 0 && this.isAccelKeyPressed(event)))
 					this.owner.browser.removeTab(tab);
@@ -457,7 +457,7 @@ FullTooltipManager.prototype = {
 			for (let i = 0, maxi = aExtraLabels.length; i < maxi; i++)
 			{
 				let label = aExtraLabels[i];
-				label = label.replace(/^\s+|\s+$/g, '');
+				label = label.trim();
 				if (!label)
 					continue;
 				root.appendChild(this.document.createElement('description'))
@@ -477,4 +477,4 @@ FullTooltipManager.prototype = {
 		range.deleteContents();
 		range.detach();
 	}
-};
+});
diff --git a/modules/fullscreenObserver.js b/modules/fullscreenObserver.js
index d272df0..3b878ac 100644
--- a/modules/fullscreenObserver.js
+++ b/modules/fullscreenObserver.js
@@ -35,6 +35,8 @@
 
 const EXPORTED_SYMBOLS = ['FullscreenObserver']; 
 
+Components.utils.import('resource://treestyletab-modules/utils.js');
+
 function FullscreenObserver(aWindow) {
 	this.window = aWindow;
 	this.init();
@@ -86,7 +88,10 @@ FullscreenObserver.prototype = {
 		if (d.documentElement.getAttribute('sizemode') != 'fullscreen')
 			return;
 
-		if (!w.FullScreen.useLionFullScreen) { // see https://github.com/piroor/treestyletab/issues/645
+		if (
+			!w.FullScreen.useLionFullScreen && // see https://github.com/piroor/treestyletab/issues/645
+			TreeStyleTabUtils.prefs.getPref('browser.fullscreen.autohide') // see https://github.com/piroor/treestyletab/issues/717
+			) {
 			let toolbox = w.gNavToolbox;
 			toolbox.style.marginTop = -toolbox.getBoundingClientRect().height + 'px';
 		}
diff --git a/modules/groupTab.js b/modules/groupTab.js
index 3e177d1..51aea5a 100644
--- a/modules/groupTab.js
+++ b/modules/groupTab.js
@@ -14,7 +14,7 @@
  * The Original Code is the Tree Style Tab.
  *
  * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2010-2013
+ * Portions created by the Initial Developer are Copyright (C) 2010-2014
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
@@ -39,6 +39,7 @@ const EXPORTED_SYMBOLS = ['GroupTab'];
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
+Components.utils.import('resource://treestyletab-modules/lib/inherit.jsm');
 Components.utils.import('resource://treestyletab-modules/base.js');
 Components.utils.import('resource://treestyletab-modules/pseudoTreeBuilder.js');
 
@@ -48,8 +49,7 @@ function GroupTab(aWindow)
 	this.init();
 }
 
-GroupTab.prototype = {
-	__proto__ : TreeStyleTabBase,
+GroupTab.prototype = inherit(TreeStyleTabBase, {
 
 	initialized : false,
 	shouldUpdate : false,
@@ -375,11 +375,11 @@ GroupTab.prototype = {
 		if (!b)
 			return;
 
-		var tab = this.getTabById(aEvent.getData('id'));
+		var tab = this.getTabById(aEvent.detail.id);
 		if (!tab)
 			return;
 
-		var event = aEvent.getData('sourceEvent');
+		var event = aEvent.detail.sourceEvent;
 		if (event.button == 1 ||
 			(event.button == 0 && this.isAccelKeyPressed(event)))
 			b.removeTab(tab);
@@ -397,7 +397,7 @@ GroupTab.prototype = {
 
 	onTabAttached : function GT_onTabAttached(aEvent)
 	{
-		var tab = aEvent.getData('parentTab');
+		var tab = aEvent.detail.parentTab;
 		var id = tab.getAttribute(this.kID);
 		if (tab == this.getOwnerTab() ||
 			this.document.getElementsByAttribute('tab-id', id).length)
@@ -427,4 +427,4 @@ GroupTab.prototype = {
 
 		this.checkUpdateTreeNow();
 	}
-};
+});
diff --git a/modules/lib/confirmWithPopup.js b/modules/lib/confirmWithPopup.js
index 5ccf6ac..b4f7241 100644
--- a/modules/lib/confirmWithPopup.js
+++ b/modules/lib/confirmWithPopup.js
@@ -1,7 +1,7 @@
 /**
  * @fileOverview Popup Notification (Door Hanger) Based Confirmation Library for Firefox 4.0 or later
  * @author       YUKI "Piro" Hiroshi
- * @version      4
+ * @version      6
  * Basic usage:
  *
  * @example
@@ -50,9 +50,7 @@
  *
  * @license
  *   The MIT License, Copyright (c) 2011-2012 YUKI "Piro" Hiroshi
- *   http://github.com/piroor/fxaddonlibs/blob/master/license.txt
- * @url http://github.com/piroor/fxaddonlibs/blob/master/confirmWithPopup.js
- * @url http://github.com/piroor/fxaddonlibs
+ * @url http://github.com/piroor/fxaddonlib-confirm-popup
  */
 
 if (typeof window == 'undefined')
@@ -90,8 +88,8 @@ catch(e) {
 }
 
 var confirmWithPopup;
-(function() {
-	const currentRevision = 4;
+(function(global) {
+	const currentRevision = 6;
 
 	var loadedRevision = 'confirmWithPopup' in namespace ?
 			namespace.confirmWithPopup.revision :
@@ -102,7 +100,7 @@ var confirmWithPopup;
 	}
 
 	if (!available)
-		return confirmWithPopup = undefined;
+		return global.confirmWithPopup = undefined;
 
 	const Cc = Components.classes;
 	const Ci = Components.interfaces;
@@ -130,7 +128,13 @@ var confirmWithPopup;
 				)+
 				'#notification-popup-box[anchorid="'+aOptions.anchor+'"] > #'+aOptions.anchor+' {'+
 				'	display: -moz-box;'+
-				'}'
+				'}' +
+				(aOptions.label.indexOf('\n') > -1 ?
+					'popupnotification[id="'+aOptions.id+'-notification"] .popup-notification-description {' +
+					'	white-space: pre-wrap;' +
+					'}' :
+					''
+				)
 			);
 
 		var styleSheets = aDocument.styleSheets;
@@ -195,17 +199,24 @@ var confirmWithPopup;
 					});
 		}
 
-		if (!options.browser)
+		var b = options.browser;
+		if (!b && options.window)
+			b = options.window.gBrowser;
+
+		if (!b)
 			return deferred
 					.next(function() {
 						throw new Error('confirmWithPopup requires a <xul:browser/>!');
 					});
 
-		var doc = options.browser.ownerDocument;
+		if (b.localName == 'tabbrowser')
+			b = b.selectedBrowser;
+
+		var doc = b.ownerDocument;
 		var style;
 		var done = false;
 		var postProcess = function() {
-				if (doc && style) {
+				if (doc && style && style.parentNode) {
 					doc.removeChild(style);
 					style = null;
 				}
@@ -266,6 +277,7 @@ var confirmWithPopup;
 			var secondaryActions = buttons.length > 1 ? buttons.slice(1) : null ;
 
 			options.id = options.value || 'confirmWithPopup-'+encodeURIComponent(options.label);
+			options.label = options.label.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
 
 			style = addStyleSheet(doc, options);
 
@@ -276,16 +288,20 @@ var confirmWithPopup;
 				 *          by PopupNotifications.show().
 				 */
 				doc.defaultView.PopupNotifications.show(
-					options.browser,
+					b,
 					options.id,
 					options.label,
 					options.anchor,
 					primaryAction,
 					secondaryActions,
-					{
-						__proto__ : nativeOptions,
-						dismissed : true
-					}
+					Object.create(nativeOptions, {
+						dismissed : {
+							writable     : true,
+							configurable : true,
+							enumerable   : true,
+							value        : true
+						}
+					})
 				);
 				if (!options.dismissed) {
 					/**
@@ -293,27 +309,31 @@ var confirmWithPopup;
 					 */
 					let secondTry = function() {
 						doc.defaultView.PopupNotifications.show(
-							options.browser,
+							b,
 							options.id,
 							options.label,
 							options.anchor,
 							primaryAction,
 							secondaryActions,
-							{
-								__proto__     : nativeOptions,
-								eventCallback : function(aEventType) {
-									try {
-										if (!done && (aEventType == 'removed' || aEventType == 'dismissed'))
-											deferred.fail(aEventType);
-										if (options.eventCallback)
-											options.eventCallback.call(aOptions.options || aOptions, aEventType);
-									}
-									finally {
-										if (aEventType == 'removed')
-											postProcess();
+							Object.create(nativeOptions, {
+								eventCallback : {
+									writable     : true,
+									configurable : true,
+									enumerable   : true,
+									value        : function(aEventType) {
+										try {
+											if (!done && (aEventType == 'removed' || aEventType == 'dismissed'))
+												deferred.fail(aEventType);
+											if (options.eventCallback)
+												options.eventCallback.call(aOptions.options || aOptions, aEventType);
+										}
+										finally {
+											if (aEventType == 'removed')
+												postProcess();
+										}
 									}
 								}
-							}
+							})
 						);
 					};
 					if (namespace.Deferred)
@@ -370,6 +390,10 @@ var confirmWithPopup;
 			};
 		}
 	};
+	confirmWithPopup.version = currentRevision;
+
+	global.confirmWithPopup = namespace.confirmWithPopup = confirmWithPopup;
+})(this);
 
-	namespace.confirmWithPopup = confirmWithPopup;
-})();
+if (typeof exports == 'object')
+	exports.confirmWithPopup = confirmWithPopup;
diff --git a/modules/lib/inherit.jsm b/modules/lib/inherit.jsm
new file mode 100644
index 0000000..72ce625
--- /dev/null
+++ b/modules/lib/inherit.jsm
@@ -0,0 +1,43 @@
+/**
+ * @fileOverview inherit, an alternative for __proto__
+ * @author       YUKI "Piro" Hiroshi
+ * @contributor  Infocatcher
+ * @version      3
+ *
+ * @license
+ *   The MIT License, Copyright (c) 2014 YUKI "Piro" Hiroshi.
+ *   https://github.com/piroor/fxaddonlib-inherit/blob/master/LICENSE
+ * @url http://github.com/piroor/fxaddonlib-inherit
+ */
+
+const EXPORTED_SYMBOLS = ['inherit'];
+
+function toPropertyDescriptors(aProperties) {
+	var descriptors = {};
+	Object.keys(aProperties).forEach(function(aProperty) {
+		var description = Object.getOwnPropertyDescriptor(aProperties, aProperty);
+		descriptors[aProperty] = description;
+	});
+	return descriptors;
+}
+
+function inherit(aParent, aExtraProperties) {
+	var global;
+	if (Components.utils.getGlobalForObject)
+		global = Components.utils.getGlobalForObject(aParent);
+	else
+		global = aParent.valueOf.call();
+	global = global || this;
+
+	var ObjectClass = global.Object || Object;
+
+	if (!ObjectClass.create) {
+		aExtraProperties = aExtraProperties || new ObjectClass;
+		aExtraProperties.__proto__ = aParent;
+		return aExtraProperties;
+	}
+	if (aExtraProperties)
+		return ObjectClass.create(aParent, toPropertyDescriptors(aExtraProperties));
+	else
+		return ObjectClass.create(aParent);
+}
diff --git a/modules/pseudoTreeBuilder.js b/modules/pseudoTreeBuilder.js
index f758560..89571c1 100644
--- a/modules/pseudoTreeBuilder.js
+++ b/modules/pseudoTreeBuilder.js
@@ -14,7 +14,7 @@
  * The Original Code is the Tree Style Tab.
  *
  * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2011-2013
+ * Portions created by the Initial Developer are Copyright (C) 2011-2014
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
@@ -76,10 +76,14 @@ var PseudoTreeBuilder = {
 			'    null\n' +
 			'  ).singleNodeValue;\n' +
 			'if (label) {\n' +
-			'  var customEvent = doc.createEvent("DataContainerEvent");\n' +
-			'  customEvent.initEvent(%EVENT_TYPE%, true, true);\n' +
-			'  customEvent.setData("id", label.getAttribute("tab-id"));\n' +
-			'  customEvent.setData("sourceEvent", event);\n' +
+			'  var customEvent = new doc.defaultView.CustomEvent(%EVENT_TYPE%, {\n' +
+			'      bubbles    : true,\n' +
+			'      cancelable : true,\n' +
+			'      detail     : {\n' +
+			'        id          : label.getAttribute("tab-id"),\n' +
+			'        sourceEvent : event\n' +
+			'      }\n' +
+			'    });\n' +
 			'  event.target.dispatchEvent(customEvent);\n' +
 			'}').replace('%EVENT_TYPE%', this.kTAB_LINK_CLICK.quote()));
 
diff --git a/modules/tabbarDNDObserver.js b/modules/tabbarDNDObserver.js
index 4f68b84..178c294 100644
--- a/modules/tabbarDNDObserver.js
+++ b/modules/tabbarDNDObserver.js
@@ -1261,7 +1261,7 @@ catch(e) {
 			case 'text/unicode':
 			case 'text/plain':
 			case 'text/x-moz-text-internal':
-				return [aData.replace(/^\s+|\s+$/g, '')];
+				return [aData.trim()];
 
 			case 'text/x-moz-url':
 				return [((aData instanceof Ci.nsISupportsString) ? aData.toString() : aData)
diff --git a/modules/utils.js b/modules/utils.js
index f6c0de0..b0edcd6 100644
--- a/modules/utils.js
+++ b/modules/utils.js
@@ -244,7 +244,23 @@ let TreeStyleTabUtils = {
 	},
 
 
-	isTabNotRestoredYet: function(aTab)
+	get shouldUseMessageManager()
+	{
+		if (this._shouldUseMessageManager !== null)
+			return this._shouldUseMessageManager;
+
+		try { // detect Firefox 29 and later
+			Cu.import('resource:///modules/sessionstore/ContentRestore.jsm', {});
+			this._shouldUseMessageManager = true;
+		}
+		catch(e) {
+			this._shouldUseMessageManager = false;
+		}
+		return this._shouldUseMessageManager;
+	},
+	_shouldUseMessageManager: undefined,
+
+	isTabNotRestoredYet : function utils_isTabNotRestoredYet(aTab)
 	{
 		var browser = aTab.linkedBrowser;
 		// Firefox 25 and later. See: https://bugzilla.mozilla.org/show_bug.cgi?id=867142
@@ -257,7 +273,7 @@ let TreeStyleTabUtils = {
 
 		return !!browser.__SS_restoreState;
 	},
-	isTabNeedToBeRestored: function(aTab)
+	isTabNeedToBeRestored : function utils_isTabNeedToBeRestored(aTab)
 	{
 		var browser = aTab.linkedBrowser;
 		// Firefox 25 and later. See: https://bugzilla.mozilla.org/show_bug.cgi?id=867142
@@ -291,14 +307,23 @@ let TreeStyleTabUtils = {
 		if (aBrowserWindow.getShortcutOrURI) // Firefox 24 and older
 			return aBrowserWindow.getShortcutOrURI(aURI);
 
-		// Firefox 25 and later
 		var getShortcutOrURIAndPostData = aBrowserWindow.getShortcutOrURIAndPostData;
 		var done = false;
-		Task.spawn(function() {
-			var data = yield getShortcutOrURIAndPostData(aURI);
-			aURI = data.url;
-			done = true;
-		});
+		if (getShortcutOrURIAndPostData.length == 2) {
+			// Firefox 31 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=989984
+			getShortcutOrURIAndPostData(aURI, function(aData) {
+				aURI = aData.url;
+				done = true;
+			});
+		}
+		else {
+			// Firefox 25-30
+			Task.spawn(function() {
+				var data = yield getShortcutOrURIAndPostData(aURI);
+				aURI = data.url;
+				done = true;
+			});
+		}
 
 		// this should be rewritten in asynchronous style...
 		var thread = Cc['@mozilla.org/thread-manager;1'].getService().mainThread;
diff --git a/modules/window.js b/modules/window.js
index 5ffa3e2..2a5fb0e 100644
--- a/modules/window.js
+++ b/modules/window.js
@@ -14,7 +14,7 @@
  * The Original Code is the Tree Style Tab.
  *
  * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2012-2013
+ * Portions created by the Initial Developer are Copyright (C) 2012-2014
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
@@ -41,6 +41,7 @@ const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
+Cu.import('resource://treestyletab-modules/lib/inherit.jsm');
 
 XPCOMUtils.defineLazyGetter(this, 'window', function() {
 	Cu.import('resource://treestyletab-modules/lib/namespace.jsm');
@@ -64,7 +65,7 @@ XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabThemeManager', 'resource://
 XPCOMUtils.defineLazyModuleGetter(this, 'FullscreenObserver', 'resource://treestyletab-modules/fullscreenObserver.js');
 XPCOMUtils.defineLazyModuleGetter(this, 'BrowserUIShowHideObserver', 'resource://treestyletab-modules/browserUIShowHideObserver.js');
 
-function TreeStyleTabWindow(aWindow) 
+function TreeStyleTabWindow(aWindow)
 {
 	this.window = aWindow;
 	this.document = aWindow.document;
@@ -80,10 +81,9 @@ function TreeStyleTabWindow(aWindow)
 	XPCOMUtils.defineLazyModuleGetter(aWindow, 'TreeStyleTabBrowser', 'resource://treestyletab-modules/browser.js');
 }
 
-TreeStyleTabWindow.prototype = {
+TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
 	
 	base : TreeStyleTabBase, 
-	__proto__ : TreeStyleTabBase,
  
 	window : null, 
 	document : null,
@@ -162,18 +162,18 @@ TreeStyleTabWindow.prototype = {
 			w.gBrowser ;
 	},
  
-	get browserToolbox()
+	get browserToolbox() 
 	{
 		var w = this.window;
 		return w.gToolbox || w.gNavToolbox;
 	},
  
-	get browserBox()
+	get browserBox() 
 	{
 		return this.document.getElementById('browser');
 	},
  
-	get browserBottomBox()
+	get browserBottomBox() 
 	{
 		return this.document.getElementById('browser-bottombox');
 	},
@@ -269,7 +269,7 @@ TreeStyleTabWindow.prototype = {
  
 	shouldOpenSearchResultAsChild : function TSTWindow_shouldOpenSearchResultAsChild(aTerm) 
 	{
-		aTerm = aTerm.replace(/^\s+|\s+$/g, '');
+		aTerm = aTerm.trim();
 
 		var mode = utils.getTreePref('autoAttach.searchResult');
 		if (mode == this.kSEARCH_RESULT_ATTACH_ALWAYS) {
@@ -279,18 +279,8 @@ TreeStyleTabWindow.prototype = {
 			return false;
 		}
 
-		var w = this.document.commandDispatcher.focusedWindow;
-		if (!w || w.top != this.browser.contentWindow)
-			w = this.browser.contentWindow;
-
-		return (function checkWindow(aWindow) {
-			if (!aWindow || !(aWindow instanceof Ci.nsIDOMWindow))
-				return false;
-			var selection = aWindow.getSelection();
-			if (selection && selection.toString().replace(/^\s+|\s+$/g, '') == aTerm)
-				return true;
-			return aWindow.frames ? Array.slice(aWindow.frames).some(checkWindow) : false ;
-		})(w);
+		var selection = this.window.getBrowserSelection();
+		return selection.trim() == aTerm;
 	},
 	kSEARCH_RESULT_DO_NOT_ATTACH      : 0,
 	kSEARCH_RESULT_ATTACH_IF_SELECTED : 1,
@@ -375,6 +365,10 @@ TreeStyleTabWindow.prototype = {
 		w.addEventListener('beforecustomization', this, true);
 		w.addEventListener('aftercustomization', this, false);
 
+		// for Firefox 29 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=942374
+		if (w.messageManager && utils.shouldUseMessageManager)
+			w.messageManager.addMessageListener('SessionStore:restoreTabContentStarted', this);
+
 		this.fullscreenObserver = new FullscreenObserver(this.window);
 		this.initUIShowHideObserver();
 
@@ -505,6 +499,10 @@ TreeStyleTabWindow.prototype = {
 				w.removeEventListener('beforecustomization', this, true);
 				w.removeEventListener('aftercustomization', this, false);
 
+				// for Firefox 29 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=942374
+				if (w.messageManager && utils.shouldUseMessageManager)
+					w.messageManager.removeMessageListener('SessionStore:restoreTabContentStarted', this);
+
 				this.fullscreenObserver.destroy();
 				delete this.fullscreenObserver;
 
@@ -735,9 +733,9 @@ TreeStyleTabWindow.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_KEY_DOWN, b, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_KEY_DOWN, b, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_KEY_DOWN.replace(/^nsDOM/, ''), b, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_KEY_DOWN.replace(/^nsDOM/, ''), b, true, false, data);
 	},
 	accelKeyPressed : false,
 	arrowKeyEventOnTab : null,
@@ -790,9 +788,9 @@ TreeStyleTabWindow.prototype = {
 			)
 			) {
 			/* PUBLIC API */
-			this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_START, b, true, false, data);
+			this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_START, b, true, false, data);
 			// for backward compatibility
-			this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_START.replace(/^nsDOM/, ''), b, true, false, data);
+			this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_START.replace(/^nsDOM/, ''), b, true, false, data);
 			return;
 		}
 
@@ -808,9 +806,9 @@ TreeStyleTabWindow.prototype = {
 
 		/* PUBLIC API */
 		let (event) {
-			this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END, b, true, false, data);
+			this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END, b, true, false, data);
 			// for backward compatibility
-			this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END.replace(/^nsDOM/, ''), b, true, false, data);
+			this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END.replace(/^nsDOM/, ''), b, true, false, data);
 		}
 
 		if (this._tabShouldBeExpandedAfterKeyReleased) {
@@ -841,9 +839,9 @@ TreeStyleTabWindow.prototype = {
 			sourceEvent  : null
 		};
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END, this.browser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END, this.browser, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END.replace(/^nsDOM/, ''), this.browser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_TAB_FOCUS_SWITCHING_END.replace(/^nsDOM/, ''), this.browser, true, false, data);
 	},
  
 	get shouldListenKeyEventsForAutoExpandByFocusChange() 
@@ -861,6 +859,24 @@ TreeStyleTabWindow.prototype = {
 				prefs.getPref('browser.ctrlTab.previews');
 	},
    
+	// for Firefox 29 and later, after https://bugzilla.mozilla.org/show_bug.cgi?id=942374
+	receiveMessage : function TSTWindow_receiveMessage(aMessage) 
+	{
+		var browser = aMessage.target;
+		var tabbrowser = this.getTabBrowserFromChild(browser);
+		if (!tabbrowser)
+			return;
+		var tab = tabbrowser.treeStyleTab.getTabFromBrowser(browser);
+		if (!tab)
+			return;
+
+		switch (aMessage.name)
+		{
+			case 'SessionStore:restoreTabContentStarted':
+				return tabbrowser.treeStyleTab.onRestoreTabContentStarted(tab);
+		}
+	},
+ 
 	onTabbarResizeStart : function TSTWindow_onTabbarResizeStart(aEvent) 
 	{
 		if (aEvent.button != 0)
@@ -1090,7 +1106,11 @@ TreeStyleTabWindow.prototype = {
 			}
 			if (TabsInTitlebar) {
 				let allowed = isTopTabbar && this.browser.treeStyleTab.fixed;
-				if ('navbarontop' in this.window && utils.getTreePref('compatibility.NavbarOnTitlebar'))
+				if (
+					(this.window.TabsOnBottom && utils.getTreePref('compatibility.TabsOnBottom')) ||
+					('navbarontop' in this.window && utils.getTreePref('compatibility.NavbarOnTitlebar')) ||
+					('classicthemerestorerjs' in this.window && utils.getTreePref('compatibility.ClassicThemeRestorer'))
+					)
 					allowed = true;
 				TabsInTitlebar.allowedBy('TreeStyleTab-tabsOnTop', allowed);
 			}
@@ -1346,9 +1366,9 @@ TreeStyleTabWindow.prototype = {
 			};
 		var canClose = (
 			/* PUBLIC API */
-			this.fireDataContainerEvent(this.kEVENT_TYPE_SUBTREE_CLOSING, b, true, true, data) &&
+			this.fireCustomEvent(this.kEVENT_TYPE_SUBTREE_CLOSING, b, true, true, data) &&
 			// for backward compatibility
-			this.fireDataContainerEvent(this.kEVENT_TYPE_SUBTREE_CLOSING.replace(/^nsDOM/, ''), b, true, true, data)
+			this.fireCustomEvent(this.kEVENT_TYPE_SUBTREE_CLOSING.replace(/^nsDOM/, ''), b, true, true, data)
 		);
 		return canClose;
 	},
@@ -1362,9 +1382,9 @@ TreeStyleTabWindow.prototype = {
 			};
 
 		/* PUBLIC API */
-		this.fireDataContainerEvent(this.kEVENT_TYPE_SUBTREE_CLOSED, aTabBrowser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_SUBTREE_CLOSED, aTabBrowser, true, false, data);
 		// for backward compatibility
-		this.fireDataContainerEvent(this.kEVENT_TYPE_SUBTREE_CLOSED.replace(/^nsDOM/, ''), aTabBrowser, true, false, data);
+		this.fireCustomEvent(this.kEVENT_TYPE_SUBTREE_CLOSED.replace(/^nsDOM/, ''), aTabBrowser, true, false, data);
 	},
  
 	warnAboutClosingTabSubtreeOf : function TSTWindow_warnAboutClosingTabSubtreeOf(aTab) 
@@ -1389,9 +1409,11 @@ TreeStyleTabWindow.prototype = {
 		var checked = { value:true };
 		var w = this.window;
 		w.focus();
+		var message = utils.tabbrowserBundle.getFormattedString('tabs.closeWarningMultipleTabs', [aTabsCount]) || // Firefox 28 and older
+						w.PluralForm.get(aTabsCount, utils.tabbrowserBundle.getString('tabs.closeWarningMultiple')).replace('#1', aTabsCount) ; // Firefox 29 and later
 		var shouldClose = Services.prompt.confirmEx(w,
 				utils.tabbrowserBundle.getString('tabs.closeWarningTitle'),
-				utils.tabbrowserBundle.getFormattedString('tabs.closeWarningMultipleTabs', [aTabsCount]),
+				message,
 				(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
 				(Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1),
 				utils.tabbrowserBundle.getString('tabs.closeButtonMultiple'),
@@ -1753,5 +1775,5 @@ TreeStyleTabWindow.prototype = {
 		}
 	}
   
-}; 
+}); 
   
diff --git a/skin/classic/treestyletab/Linux-base.css b/skin/classic/treestyletab/Linux-base.css
index e260f5a..a5d1aae 100644
--- a/skin/classic/treestyletab/Linux-base.css
+++ b/skin/classic/treestyletab/Linux-base.css
@@ -1,3 +1,5 @@
+ at import url("./Linux-tabs-on-bottom.css");
+
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 /* splitter for floating & autohide tab bar */
@@ -22,12 +24,6 @@
 	border-left: 1px solid ThreeDShadow;
 }
 
-/* bottom border of the "Tabs on Bottom" toolbox */
-#main-window[treestyletab-mode="vertical"]:not([disablechrome])
-  #navigator-toolbox:not([tabsontop="true"]) {
-	border-bottom: 1px solid ThreeDShadow;
-}
-
 
 /* pinned tabs on "Default" skin */
 
@@ -53,3 +49,9 @@
 	background: url("chrome://browser/skin/privatebrowsing-mask.png") center no-repeat;
 	width: 30px;
 }
+
+/* disable bottom border of the tab bar */
+#main-window:not([treestyletab-tabbar-position="top"])
+  #TabsToolbar::after {
+	display: none;
+}
diff --git a/skin/classic/treestyletab/Linux-tabs-on-bottom.css b/skin/classic/treestyletab/Linux-tabs-on-bottom.css
new file mode 100644
index 0000000..567d94a
--- /dev/null
+++ b/skin/classic/treestyletab/Linux-tabs-on-bottom.css
@@ -0,0 +1,7 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+/* bottom border of the "Tabs on Bottom" toolbox */
+#main-window[treestyletab-mode="vertical"]:not([disablechrome])
+  #navigator-toolbox:not([tabsontop="true"]) {
+	border-bottom: 1px solid ThreeDShadow;
+}
diff --git a/skin/classic/treestyletab/WINNT-base.css b/skin/classic/treestyletab/WINNT-base.css
index 07784b9..bd11b6e 100644
--- a/skin/classic/treestyletab/WINNT-base.css
+++ b/skin/classic/treestyletab/WINNT-base.css
@@ -14,6 +14,6 @@
   #nav-bar::after {
 	display: -moz-box;
 	content: "";
-	background: url("chrome://browser/skin/privatebrowsing-indicator.png") center no-repeat;
+	background: url("chrome://browser/skin/privatebrowsing-mask-titlebar.png") center no-repeat;
 	width: 30px;
 }
diff --git a/skin/classic/treestyletab/base.css b/skin/classic/treestyletab/base.css
index f05b0ce..4cce227 100644
--- a/skin/classic/treestyletab/base.css
+++ b/skin/classic/treestyletab/base.css
@@ -49,6 +49,7 @@
 }
 .treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > *:first-child,
 .treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > *:first-child[hidden="true"] + *:not(toolbarpaletteitem),
+.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > #private-browsing-indicator:first-child + *:not(toolbarpaletteitem), /* for Linux */
 .treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > .treestyletab-toolbar-inner-box {
 	-moz-border-top-colors: none !important;
 	border-top: 0 none !important;
diff --git a/skin/classic/treestyletab/sidebar/sidebar.css b/skin/classic/treestyletab/sidebar/sidebar.css
index 86b1ca2..0e77691 100644
--- a/skin/classic/treestyletab/sidebar/sidebar.css
+++ b/skin/classic/treestyletab/sidebar/sidebar.css
@@ -169,6 +169,7 @@ tabbrowser[treestyletab-mode="vertical"]
 .tabbrowser-tabs[treestyletab-mode="vertical"]
   .tab-close-button {
 	margin-left: 3px;
+	background: none;
 }
 
 .tabbrowser-tabs[treestyletab-mode="vertical"]
diff --git a/skin/classic/treestyletab/square/base.css b/skin/classic/treestyletab/square/base.css
index 6cc3e0d..a88787f 100644
--- a/skin/classic/treestyletab/square/base.css
+++ b/skin/classic/treestyletab/square/base.css
@@ -1,3 +1,5 @@
+ at import url("./disable-closebox-bg.css");
+
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 /* Default style */
@@ -218,15 +220,8 @@
 .tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
   .tabbrowser-tab
   .tab-close-button {
-	height: auto;
 	margin: 0 !important;
 	padding: 0 !important;
-	background: transparent;
-}
-.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
-  .tabbrowser-tab[selected="true"]
-  .tab-close-button {
-	background: transparent;
 }
 
 .tabbrowser-tabs[treestyletab-mode="vertical"]
diff --git a/skin/classic/treestyletab/square/disable-closebox-bg.css b/skin/classic/treestyletab/square/disable-closebox-bg.css
new file mode 100644
index 0000000..0b75ed8
--- /dev/null
+++ b/skin/classic/treestyletab/square/disable-closebox-bg.css
@@ -0,0 +1,20 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+/**
+ * Disable background images for closebox in tabs.
+ * This must be activated on:
+ *  - WINNT, any version
+ *  - OS X, any version
+ *  - Linux, Firefox 30 or older
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=879921
+ */
+
+.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
+  .tabbrowser-tab
+  .tab-close-button,
+.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
+  .tabbrowser-tab[selected="true"]
+  .tab-close-button {
+	height: auto;
+	background: transparent;
+}
diff --git a/skin/classic/treestyletab/ui-australis.css b/skin/classic/treestyletab/ui-australis.css
new file mode 100644
index 0000000..4ca6ec4
--- /dev/null
+++ b/skin/classic/treestyletab/ui-australis.css
@@ -0,0 +1,8 @@
+ at import url("./ui-base.css");
+
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+/* don't show the dummy titlebar, even if chromemargin is applied by Fox Splitter or someone */
+#main-window:not([treestyletab-tabbar-position="top"])[chromemargin]:not([tabsintitlebar]):not([chromemargin^="0,"]) > #titlebar {
+	display: none;
+}
diff --git a/skin/classic/treestyletab/ui.css b/skin/classic/treestyletab/ui-base.css
similarity index 100%
rename from skin/classic/treestyletab/ui.css
rename to skin/classic/treestyletab/ui-base.css

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tree-style-tab.git



More information about the Pkg-mozext-commits mailing list