Created
July 5, 2009 10:05
-
-
Save Griever/140916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name VerticalTabbar.uc.js | |
// @namespace http://d.hatena.ne.jp/Griever/ | |
// @include main | |
// ==/UserScript== | |
(function(){ | |
var tabbox = document.getAnonymousElementByAttribute(gBrowser, "anonid", "tabbox"); | |
var v = { | |
mStrip : gBrowser.mStrip, | |
mTabContainer : gBrowser.mTabContainer, | |
tabsContainer : gBrowser.mTabContainer.mTabstrip.parentNode, | |
arrowscrollbox : gBrowser.mTabContainer.mTabstrip, | |
}; | |
tabbox.orient = 'horizontal'; | |
for (var n in v) v[n].orient = 'vertical'; | |
var splitter = document.createElement('splitter'); | |
splitter.id = 'vertical-tabbar-splitter'; | |
v.mStrip.parentNode.insertBefore(splitter, v.mStrip.nextSibling); | |
var style = <![CDATA[ | |
[orient="horizontal"][anonid="tabbox"] tab { | |
max-height: 26px !important; | |
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; | |
margin: 0 !important; | |
} | |
[orient="horizontal"][anonid="tabbox"] .tabs-container{ padding: 0px !important; } | |
[orient="horizontal"][anonid="tabbox"] .tab-drop-indicator-bar{ visibility: collapse !important; } | |
[orient="horizontal"][anonid="tabbox"] .tab-icon-image{ margin: 0 2px 0 4px !important; } | |
[orient="horizontal"][anonid="tabbox"] .tabbrowser-arrowscrollbox{ | |
min-width: 28px !important; | |
max-width: 150px !important; | |
} | |
/* Auto hide | |
[orient="horizontal"][anonid="tabbox"] .tabbrowser-strip:hover{ | |
min-width: 150px !important; | |
} | |
*/ | |
]]>.toString(); | |
var sspi = document.createProcessingInstruction( | |
'xml-stylesheet', | |
'type="text/css" href="data:text/css,' + encodeURI(style) + '"' | |
); | |
document.insertBefore(sspi, document.documentElement); | |
sspi.getAttribute = function(name) { | |
return document.documentElement.getAttribute(name); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment