Skip to content

Instantly share code, notes, and snippets.

@soulhotel
Last active February 25, 2024 14:07
Show Gist options
  • Save soulhotel/bf890d7023636ecfeca3db6690a9fd2e to your computer and use it in GitHub Desktop.
Save soulhotel/bf890d7023636ecfeca3db6690a9fd2e to your computer and use it in GitHub Desktop.
hide EVERYTHING... on the nav bar, firefox css
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*refer to video below*/
/* i wanted to hide every button on the nav bar, unless the nav bar is hovered.. simple right?..
first, to exclude key buttons. min, max, close, new window, fullscreen, ☰ Menu button, ublock, sidebery.
this is a list of what will NOT be affected. url bar is uneffected. feel free to modify. */
toolbarbutton:not([id="minimize_dhanush_com-BAP"], [id="close_dhanush_com-BAP"],
[id="new-window-button"], [id="fullscreen-button"], [id="nav-bar-overflow-button"],
[class="titlebar-button titlebar-min"], [class="titlebar-button titlebar-max"],
[class="titlebar-button titlebar-restore"], [class="titlebar-button titlebar-close"],
[id="PanelUI-menu-button"], [data-extensionid="[email protected]"], [id="urlbar-zoom-button"],
[data-extensionid="{3c078156-979c-498b-8990-85f7987dd929}"] /*<- extension id is for sidebery*/
), /*<-do not remove this ")," if you value your life*/
#PlacesToolbarItems /* <- this hides bookmarks */
{ opacity: 0.01 !important; -moz-transition: visibility 1s, opacity 1s ease !important;}
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/* now to make them show when nav bar is hovered */
#navigator-toolbox:hover toolbarbutton,
#navigator-toolbox:hover #PlacesToolbarItems, <-show hidden bookmarks
/* to make it ALWAYS SHOW if customize toolbar page is open,
you can see and move them without dealing with them fading in and out */
toolbarpaletteitem:is([place="palette"], [touchdownstartsdrag="true"], [touchdownstartsdrag="false"])
toolbarbutton:not([id="minimize_dhanush_com-BAP"], [id="close_dhanush_com-BAP"],
[id="new-window-button"], [id="fullscreen-button"], [id="nav-bar-overflow-button"],
[class="titlebar-button titlebar-min"], [class="titlebar-button titlebar-max"],
[class="titlebar-button titlebar-restore"], [class="titlebar-button titlebar-close"],
[id="PanelUI-menu-button"], [data-extensionid="[email protected]"], [id="urlbar-zoom-button"],
[data-extensionid="{3c078156-979c-498b-8990-85f7987dd929}"]) /*<- extension id is for sidebery*/
{opacity: 1 !important;}
/* finally, to prevent ALL submenus from showing up with no buttons */
/* there is a lot of pontential breakage prevented from these simple inclusions below */
#unified-extensions-panel[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#protections-popup[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#identity-popup[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#appMenu-popup[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#downloads-button-autohide-panel[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#widget-overflow[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#permission-popup[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#downloadsPanel[panelopen="true"] toolbarbutton {opacity: 1 !important;}
#webextension-remote-preload-panel[panelopen="true"] toolbarbutton {opacity: 1 !important;}
panel[panelopen="true"] toolbarbutton {opacity: 1 !important;}
/*#panel at the end is future proof */
/*the end*/
/*
list of every default release toolbar button not used
history-panelmenu
save-page-button
print-button
find-button
open-file-button
sidebar-button
email-link-button
logins-button
sync-button
screenshot-button
preferences-button
privatebrowsing-button
developer-button
import-button
bookmarks-menu-button
home-button
library-button
panic-button /*forget history button lol*/
fxa-toolbar-menu-button /*firefox account button*/
firefox-view-button
*/
@soulhotel
Copy link
Author

soulhotel commented Feb 25, 2024

2024-02-25.07-41-36.mp4

Bonus: The ☰ Panel Menu is now an invisible button that sits over the sidebery/sidebar logo. Super Simple. Clears space up. All I did was move it.

#PanelUI-button {
display: block !important; position: fixed !important;
opacity: 0 !important; z-index: 2 !important; left: 0 !important;
top: 3.4em !important;} /* adjust 3.4 to position over sidebery button if needed */
#main-window[sizemode="fullscreen"] #PanelUI-button{ display:none !important; }

https://www.reddit.com/r/FirefoxCSS/comments/1azei29/i_took_the_menu_button_and_did_this/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment