diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index 108bfd04..aed52c47 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -502,3 +502,8 @@ image.tab-icon { visibility: collapse; } +/* ColorfulTabs */ +:root:not([treestyletab-tabbar-position="top"]) #ctStack, +:root:not([treestyletab-tabbar-fixed="true"]) #ctStack { + display: none; +} diff --git a/content/treestyletab/windowHelperHacks.js b/content/treestyletab/windowHelperHacks.js index a95edb6b..6ca5adf2 100644 --- a/content/treestyletab/windowHelperHacks.js +++ b/content/treestyletab/windowHelperHacks.js @@ -532,7 +532,7 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove // Colorful Tabs // https://addons.mozilla.org/firefox/addon/1368 - if ('clrtabsInit' in window && + if ('colorfulTabs' in window && sv.getTreePref('compatibility.ColorfulTabs')) { let listener = { handleEvent : function(aEvent) @@ -544,11 +544,11 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove var child = aEvent.originalTarget; var parent = aEvent.parentTab; if (child && parent) { - setColor(child, TreeStyleTabService.SessionStore.getTabValue(parent, 'tabClr')); + colorfulTabs.setColor(child, TreeStyleTabService.SessionStore.getTabValue(parent, 'tabClr')); } else if (child) { - TreeStyleTabService.SessionStore.setTabValue(child, 'tabClr', '') - calcTabClr({ + TreeStyleTabService.SessionStore.setTabValue(child, 'tabClr', ''); + colorfulTabs.calcTabClr({ target : child, originalTarget : child, }); @@ -563,6 +563,12 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove } } }; + eval('colorfulTabs.show_ctStack = '+ + colorfulTabs.show_ctStack.toSource().replace( + '.setProperty("display", "-moz-stack", "important")', + '.display = ""' + ) + ); document.addEventListener('TreeStyleTabAttached', listener, false); document.addEventListener('TreeStyleTabParted', listener, false); document.addEventListener('unload', listener, false);