Skip to content

Instantly share code, notes, and snippets.

@gabrielfin
Created August 31, 2018 20:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielfin/b3b860b3adec1d2192751f16bca1bcc2 to your computer and use it in GitHub Desktop.
Save gabrielfin/b3b860b3adec1d2192751f16bca1bcc2 to your computer and use it in GitHub Desktop.
Chromeless Firefox
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#PersonalToolbar,
#BookmarksToolbar,
#MenuToolbar,
#nav-bar{ display: none !important; }
#tabbrowser-tabs, #tabbrowser-tabs > .tabbrowser-arrowscrollbox {
min-height: 0 !important;
}
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"] {
visibility: collapse;
}
#tabbrowser-tabs .tabs-newtab-button {
visibility: collapse !important;
}
#tabbrowser-tabs tab {
min-height: var(--tab-min-height)
}
@gabrielfin
Copy link
Author

gabrielfin commented Aug 31, 2018

  1. Close firefox

  2. Run firefox -P
    (If you're running windows, you have to put the full path to firefox.exe instead of just firefox)

  3. Create a new profile and name it "app"

  4. Select the "Default" profile, check "Use the selected profile..." and click on "Start Firefox"
    https://i.imgur.com/ckJ6o1T.png

  5. Open about:profiles and under "Profile: app" > "Root Directory" click on "Open Directory"
    https://i.imgur.com/rRJ0xoQ.png

  6. Create a folder called chrome and inside a file called userChrome.css. Inside that file, paste the contents of this Gist

  7. Run
    firefox -P app --new-instance http://www.reddit.com
    (or full path to firefox.exe)
    Result: https://i.imgur.com/AdpGTyQ.png

  8. Create desktop/menu shortcuts to your favorite webapps

  9. Profit!

Credits to https://askubuntu.com/a/487954/593872 and https://gist.github.com/BenoitAverty/af633ee20e27f48f9ba7178451432206

@milksleisure
Copy link

Hi! I've found that for Firefox 68, I need to change the following line
#nav-bar{ display: none !important; }
into
#nav-bar{ visibility: collapse !important; }
in order to make Firefox load the page, instead of a pure empty page.
I am not sure what have been changed in the browser part, I guess it is a init sequence change for Firefox?

@kogaba
Copy link

kogaba commented Oct 20, 2019

FireFox 69 needs to additional enable
about:config
toolkit.legacyUserProfileCustomizations.stylesheets -> true
And if nav-bar not visible the site is not visible either :/

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