Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Hide OS buttons in Firefox

edited October 2007 in userstyles.org
If you toggle Firefox in full screen mode there remains in the top the address and navigation bar with OS buttons on right side (minimize/window size/exit).
Is there any idea how to hide the OS buttons, at least the exit button? I couldn't find a command or style for it.
This style would be useful for a public computer, where everyone may use Firefox. But some of the users use to shut down Firefox when they leave.
Hoping for a suggestion!

Joke

Comments

  • For Windows, because I don't know if this would work in Linux. This will hide all the buttons:

    @-moz-document url(chrome://browser/content/browser.xul) {
    #main-window #window-controls
    {display:none !important;}
    }

    Alternatively, you could hide individual buttons like this, remove any that you DON'T want to hide:

    @-moz-document url(chrome://browser/content/browser.xul) {
    #main-window #minimize-button,
    #main-window #restore-button,
    #main-window #close-button
    {display:none !important;}
    }

    You would still need to disable Alt-F4.
  • Hi Webb,

    Great, thank you so much!
    In the meantime I tried your first suggestion. It works fine, as well with Linux.

    Thanks again, Joke
  • @Webb / @Joke, while I know that this thread is old. I've been searching for sometime now, and have came across many references like yours, but no one says how to actually make the changes.

    /**
    * @-moz-document url(chrome://browser/content/browser.xul) {
    * #main-window #minimize-button,
    * #main-window #restore-button,
    * #main-window #close-button
    * {display:none !important;}
    * }
    **/

    Where do I go to make these changes?
    My firefox version: 25.0.1, I also use Firefox 21.
    System: Windows 7 and Xp
    Thanks.
  • Click on the Stylish icon and select Write new style > Blank style.

    Cut and paste the code into the editor and give the style a name. You can't save it unless it has a name.

    I use the Stylish Custom editor so this part may be different for you -

    In the editor click on Preview to make sure the style works. When you are satisfied that it works save the style and close the editor.
  • Hi Webb,

    Thanks for the reply, but I still don't understand.
    See attached, I taken a screenshot of what I'm looking at.
    Again, thanks for your assistance.
    1600 x 860 - 260K
  • You are editing the wrong file (I think) If you don't use Stylish you should edit UserChrome.css

    http://kb.mozillazine.org/index.php?title=UserChrome.css&printable=yes
  • edited December 2013
    As Webb said, click the Stylish button >Write new > blank style, paste the code there, name it and save. But pay attention: you posted a code which is commented, it means it doesn't suppose to work. You need to delete /** and **/ so it looks like this:

    @-moz-document url(chrome://browser/content/browser.xul) {
    #main-window #minimize-button,
    #main-window #restore-button,
    #main-window #close-button
    {display:none !important;}
    }


    Notice also, that this code ^ hides all buttons, if you want to hide the Close button only, you need the last 2 lines, so it looks like this:

    @-moz-document url(chrome://browser/content/browser.xul) {
    #main-window #close-button
    {display:none !important;}
    }


    If you don't have Stylish installed and came here through some search, install it: https://addons.mozilla.org/en-US/firefox/addon/stylish
  • edited December 2013
    I've doe this before in my kiosk styles. Not exactly in that particular way, I think but I've managed to hide them before. Here's the way I did it;
    #window-controls 
    {
    display: none !important;
    }
    Edit: I see somebodyelse did the same thing except I didn't specify main-window in my instance. Doesn't seem to make a difference to me.
  • Using only #window-oontrols will make the style apply to all.

    If you already declared the document rule with @-moz-document url(chrome://browser/content/browser.xul), then you don't need to add #main-window.
  • @Webb / @Makondo,

    Thanks for the assistance, I got it.
    I had already tried the UserChrome.css to hide the Close Button, but that didn't work.
    Stylish worked, thanks.

    Also, I placed the code above in a comment to try to distinguish it as the original code posted by @Webb.

    Thanks again.
Sign In or Register to comment.