MozillaZine

some userChrome.css settings don't works

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

Post Posted October 5th, 2017, 8:31 am

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/gatekeeper/there.is.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.

LIMPET235
Moderator

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

Post Posted October 5th, 2017, 8:58 am

Moving this to Firefox Support...
Ancient Amateur Astronomer
Win-7-HP/Intel® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-50.0-56.0.1/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
RadioYachting. Conficker Test. (Always choose the "Custom" Install.)

dickvl

User avatar
 
Posts: 52265
Joined: July 18th, 2005, 3:25 am

Post Posted October 5th, 2017, 10:25 am


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

Post Posted October 5th, 2017, 11:17 am

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

Post Posted October 6th, 2017, 5:08 am

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/source/browser/components/preferences/in-content/advanced.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

Post Posted October 6th, 2017, 5:10 am

Code: Select all
#updatePanel  { display: none !important; }


It don't works :(

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

Post Posted October 6th, 2017, 5:15 am

updateApp still valid in FF 52
<groupbox id="updateApp" align="start">
https://dxr.mozilla.org/mozilla-esr52/source/browser/components/preferences/in-content/advanced.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: 2370
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 6th, 2017, 7:31 am

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.

dickvl

User avatar
 
Posts: 52265
Joined: July 18th, 2005, 3:25 am

Post Posted October 6th, 2017, 9:10 am

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.

Return to Firefox Support


Who is online

Users browsing this forum: DanRaisch and 14 guests