some userChrome.css settings don't works

User Help for Mozilla Firefox
Post Reply
sj85
Posts: 4
Joined: October 5th, 2017, 8:16 am

some userChrome.css settings don't works

Post by sj85 »

Hi,

I deploy Firefox over local network for about 400 computers.

I use userChrome.css to hide some functionnality or buttons like Updates tab in Options > Advanced.

It works in FF 45.0.1 ESR but don't works in FF 53.2.0 ESR.

See my userChrome.css file :

/*
* Do not remove the @namespace line -- it's required for correct functioning
*/
@namespace url("http://www.mozilla.org/keymaster/gateke ... s.only.xul"); /* set default namespace to XUL */

/*
* Make all the default font sizes 20 pt:
*/
*{
font-size: 15pt !important;
}


/* Remove access to user interface elements that are not suitable for application virtualization */

/* Options - Advanced - General - System Defaults */
#systemDefaultsGroup { display: none !important; }

/* Options / Advanced / Update / Firefox updates group box */
#updateApp { display: none !important; }

/* Help - About - Check for Updates button */
#updateButton { display: none !important; }


Green option to grow police (for the test) works, but options in red color don't works.

My userChrome.css file is located in C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\9bp83g10.default\chrome.

Is there some userChrome options deprecated in FF 50+ ?

has anyone succeeded to hide Updates features in Firefox +50 with userChrome.css ?

Thanks.
User avatar
LIMPET235
Moderator
Posts: 39933
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: some userChrome.css settings don't works

Post by LIMPET235 »

Moving this to Firefox Support...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: some userChrome.css settings don't works

Post by dickvl »

morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: some userChrome.css settings don't works

Post by morat »

Try something like:

Code: Select all

/* Firefox userContent.css */

@-moz-document url-prefix("about:preferences"),
url-prefix("chrome://browser/content/preferences/in-content/preferences.xul") {
  .main-content:after {
    content: "Sorry, preferences cannot be modified.";
    font: 36px Arial;
    margin-left: 5px;
  }
  #mainPrefPane {
    display: none !important;
  }
}
http://kb.mozillazine.org/UserContent.css

systemDefaultsGroup is really old
http://dxr.mozilla.org/mozilla-esr31/se ... aultsGroup
http://dxr.mozilla.org/mozilla-esr38/se ... aultsGroup

updateApp is still valid
view-source:chrome://browser/content/preferences/in-content/preferences.xul

updateButton is still valid
view-source:chrome://browser/content/aboutDialog.xul
sj85
Posts: 4
Joined: October 5th, 2017, 8:16 am

Re: some userChrome.css settings don't works

Post by sj85 »

Hi,

thanks for your reply.

morat, I try userContent and it works, but I only want to hide "Updates" tab in the "Advanced" Pane.

What is the différence between userChrome and userContent ? In previous version of FF, I only user userChrome.css.

How can i found the name or ID of the "Updates" tab in the options ?
dickvl give a link to https://dxr.mozilla.org/mozilla-esr52/s ... vanced.xul and I see "<tabpanel id="updatePanel" orient="vertical">"

So maybe :

Code: Select all

#updatePanel  { display: none !important; }
In userChrome or userContent ?

SJ
sj85
Posts: 4
Joined: October 5th, 2017, 8:16 am

Re: some userChrome.css settings don't works

Post by sj85 »

Code: Select all

#updatePanel  { display: none !important; }
It don't works :(
sj85
Posts: 4
Joined: October 5th, 2017, 8:16 am

Re: some userChrome.css settings don't works

Post by sj85 »

updateApp still valid in FF 52
<groupbox id="updateApp" align="start">
https://dxr.mozilla.org/mozilla-esr52/s ... vanced.xul

I don't know why this code don't works in userChrome.css like previous version :

Code: Select all

/* Options / Advanced / Update / Firefox updates group box */
#updateApp  { display: none !important; }
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: some userChrome.css settings don't works

Post by morat »

sj85 wrote:What is the difference between userChrome and userContent?
http://kb.mozillazine.org/UserChrome.css
http://kb.mozillazine.org/UserContent.css
Last edited by morat on October 11th, 2017, 11:16 am, edited 3 times in total.
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: some userChrome.css settings don't works

Post by dickvl »

about:preferences is a web page and thus the code needs to be in userContent.css like posted above.
@namespace html url(http://www.w3.org/1999/xhtml);

If you lock preferences then there is no way to override this.
userChrome.css and userContent.css are disabled in Safe Mode, so holding Shift when starting Firefox is sufficient to access these settings.
Post Reply