Guest User

How to merge the URL bar and the tabs toolbar

a guest
Jan 8th, 2016
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. Easy way:
  2. Use either of these:
  3. Mozilla Labs: Prospector - OneLiner
  4. https://addons.mozilla.org/en-US/firefox/addon/prospector-oneLiner
  5. Line
  6. https://addons.mozilla.org/en-US/firefox/addon/line-1
  7. Both do the same thing, but the latter has configuration options... and might cause interface glitches under circumstances unknown to me. Perhaps it'll work for you. Note that the merged bar will not disappear in full screen mode (F11), you can only remove it the hard way. HTML5 and Flash full screen will work properly so you might be fine with that.
  8.  
  9. Medium difficulty way:
  10. Install the CSS below via Stylish, and if necessary, search the CSS for "url bar width" and "tabs toolbar left margin" and adjust to make it fit your other stuff. Note that fullscreen (F11) will look weird - the URL bar will stay visible.
  11.  
  12. Hard way:
  13. Install the same CSS, plus the CSS-fix, plus the keyconfig extension, plus FireGestures (only if you want to use mouse gestures and are using an extension other than FireGestures).
  14. keyconfig
  15. http://mozilla.dorando.at/keyconfig.xpi
  16. FireGestures
  17. https://addons.mozilla.org/en-US/firefox/addon/firegestures
  18.  
  19. After that, open the CSS-fix in Stylish and see its style ID in the URL bar. Should be like that:
  20.  
  21. about:stylish-edit?id=20
  22.  
  23. Go to Add-ons manager, find keyconfig on the list of addons and press Options. Find the F11 (Full screen) key and press Disable (unless you want to set some other key to launch the script below). Press Add a new key and paste this code:
  24.  
  25. (function(){
  26. var id = [20]; //replace with your style's ID
  27. var service = Components.classes["@userstyles.org/style;1"].getService(Components.interfaces.stylishStyle)
  28. for (var i=0; i < id.length; i++){
  29. var style = service.find(id[i], service.REGISTER_STYLE_ON_CHANGE);
  30. style.enabled = !style.enabled;
  31. style.save();
  32. BrowserFullScreen();
  33. }
  34. View:FullScreen;
  35. })();
  36.  
  37. Do not forget to put your style's ID. Assign it to F11 or anywhere you want. Save the new hotkey. If you want to make a mouse gesture in FireGestures, go to Options - Mapping - Add Script and paste the same code there.
  38.  
  39. The CSS-fix:
  40.  
  41. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  42. #nav-bar {
  43. width: 0 !important; height: 0 !important;
  44. position: fixed !important; left: -1px !important; top: -1px !important;
  45. overflow: hidden !important; visibility: hidden !important;}
  46. #TabsToolbar, #tabbrowser-tabs {
  47. -moz-appearance: none !important;
  48. margin-left: 0px !important;}
  49.  
  50. The CSS itself:
  51.  
  52. @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  53. /*Offset the tabs toolbar to free up some space for the URL bar*/
  54. #TabsToolbar, #tabbrowser-tabs {
  55. -moz-appearance: none !important;
  56. height: 24px !important; min-height: 24px!important;
  57. font-family: Verdana!important;
  58. margin: 0 0px !important;
  59. margin-left: 158px !important; /*tabs toolbar left margin*/
  60.  
  61. }
  62. /*Ensure consistent text positioning in the tabs*/
  63. .tabbrowser-tab .tab-text {
  64. margin-left: 0px !important;
  65. margin-right: 0px !important;
  66. margin-top: -7px !important;
  67. padding-top: 0px !important;
  68. /* font-size: 16px !important; */
  69. }
  70. /*Put URL bar in the space*/
  71. #nav-bar {
  72. position: fixed !important; top: 1px !important; left: 0 !important;
  73. width: 338px !important; min-width: 338px !important; max-width: 338px !important;/*url bar width*/
  74. z-index: 100 !important;
  75. /* font-family: Verdana!important;*/
  76. }
  77. /*Hide some UI elements*/
  78. @-moz-document url(chrome://browser/content/browser.xul) {
  79. #back-button, #forward-button, #back-button *, #forward-button *, #urlbar-reload-button, #urlbar-stop-button, #urlbar-go-button,
  80. /**/#PanelUI-button, /**/ #home-button,
  81. #notification-popup-box, #new-tab-button, #private-browsing-indicator, #search-container, #nav-bar-overflow-button, .tab-close, .tab-throbber { display: none !important; }}
Advertisement
Add Comment
Please, Sign In to add comment