X
Tap here to go to the mobile version of the site.

Support Forum

Trying to remove access from Tools and Help menu with userChrome.css

Posted

We had originally deployed Thunderbird in our Salons with a version that supported the MenuWizard add-on. We would like to upgrade to 68.1 however the MenuWizard add-on is no longer supported nor working with that version. I have read that like Firefox, Thunderbird can be manipulated using a userChrome.css file but I cannot seem to get it to work using the commands I have found which are;

  1. tools-menu, #helpmenu { display: none !important; }

I created the chrome folder in the user profile and added the .css file to that location, however no matter how i try it never seems to apply. Can anyone help me out with this issue?

Thanks in advance!

We had originally deployed Thunderbird in our Salons with a version that supported the MenuWizard add-on. We would like to upgrade to 68.1 however the MenuWizard add-on is no longer supported nor working with that version. I have read that like Firefox, Thunderbird can be manipulated using a userChrome.css file but I cannot seem to get it to work using the commands I have found which are; #tools-menu, #helpmenu { display: none !important; } I created the chrome folder in the user profile and added the .css file to that location, however no matter how i try it never seems to apply. Can anyone help me out with this issue? Thanks in advance!

Chosen solution

I tested this css code in TB 68.1:

http://www.linnhe2.free-online.co.uk/thunderbird/chrome.html#Hide%20specific%20menus

Replace Go with Tools, or any other menu item.

Read this answer in context 1
Quote

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

More Information

sfhowes
  • Top 10 Contributor
1650 solutions 7968 answers

Do you have the @namespace line at the beginning of the css file?

https://support.mozilla.org/en-US/questions/1066285#answer-739172

Instead of userChrome, you can hide the Menu Bar:

https://support.mozilla.org/en-US/questions/1223967

(although Tools and Help are still on the AppMenu icon, which can be moved off the toolbar)

A large collection of userChrome tweaks:

http://forums.mozillazine.org/viewtopic.php?t=208761

In TB 68, you may need to switch toolkit.legacyUserProfileCustomizations.stylesheets to true in Config. editor.

Do you have the @namespace line at the beginning of the css file? https://support.mozilla.org/en-US/questions/1066285#answer-739172 Instead of userChrome, you can hide the Menu Bar: https://support.mozilla.org/en-US/questions/1223967 (although Tools and Help are still on the AppMenu icon, which can be moved off the toolbar) A large collection of userChrome tweaks: http://forums.mozillazine.org/viewtopic.php?t=208761 In TB 68, you may need to switch ''toolkit.legacyUserProfileCustomizations.stylesheets'' to true in Config. editor.
Was this helpful to you?
Quote

Question owner

First thank you for your response. I have poured over 3 pages deep of google trying to figure this out so I have tried pretty much everything, including everything you have suggested.

The @namespace line is there.

I do not wish to hide the menu bar as that is too easy to get around and we do want them to be able to get to some options. They just do not want them to have access to the tools and help menu.

In TB 68 the toolkit.legacyUserProfileCustomizations.stylesheets is already set to true. It doesn't look like that was actually disabled until 69.

Thanks again,

First thank you for your response. I have poured over 3 pages deep of google trying to figure this out so I have tried pretty much everything, including everything you have suggested. The @namespace line is there. I do not wish to hide the menu bar as that is too easy to get around and we do want them to be able to get to some options. They just do not want them to have access to the tools and help menu. In TB 68 the toolkit.legacyUserProfileCustomizations.stylesheets is already set to true. It doesn't look like that was actually disabled until 69. Thanks again,
Was this helpful to you?
Quote
sfhowes
  • Top 10 Contributor
1650 solutions 7968 answers

Chosen Solution

I tested this css code in TB 68.1:

http://www.linnhe2.free-online.co.uk/thunderbird/chrome.html#Hide%20specific%20menus

Replace Go with Tools, or any other menu item.

I tested this css code in TB 68.1: http://www.linnhe2.free-online.co.uk/thunderbird/chrome.html#Hide%20specific%20menus Replace Go with Tools, or any other menu item.
Was this helpful to you? 1
Quote

Question owner

This is exactly what I needed thank you so much for the link and all the help it is greatly appreciated!

After reading over this page I can now also remove specific Menu Items which is even better so I can really clean up the other items they do not need access to. So far everything has worked as expected and I have been able to remove most items, however I cannot seem to remove anything that has ... after it for example trying to remove Customize... from the View - Toolbars menu, or even their own example of Subscribe... see below for provided code;

/* hide some menu items */ menuitem[label="Subscribe..."], menuitem[label="Release Notes"], menuitem[label="Customize..."] {

 display: none !important;

}

Seems I am still missing something when it comes to those Menu Items. Any advice would be a great help to me.

Thanks again for solving my initial issue!

This is exactly what I needed thank you so much for the link and all the help it is greatly appreciated! After reading over this page I can now also remove specific Menu Items which is even better so I can really clean up the other items they do not need access to. So far everything has worked as expected and I have been able to remove most items, however I cannot seem to remove anything that has ... after it for example trying to remove Customize... from the View - Toolbars menu, or even their own example of Subscribe... see below for provided code; /* hide some menu items */ menuitem[label="Subscribe..."], menuitem[label="Release Notes"], menuitem[label="Customize..."] { display: none !important; } Seems I am still missing something when it comes to those Menu Items. Any advice would be a great help to me. Thanks again for solving my initial issue!
Was this helpful to you?
Quote
sfhowes
  • Top 10 Contributor
1650 solutions 7968 answers

Helpful Reply

I confirm that the code doesn't hide menu items with ..., even if the periods are removed. Perhaps you can contact the author (link on home page).

I confirm that the code doesn't hide menu items with ..., even if the periods are removed. Perhaps you can contact the author (link on home page).
Was this helpful to you? 1
Quote

Question owner

I am going to try that, for now I will mark this issue as resolved as you have solved my original questions. Thanks again for all the help!

I am going to try that, for now I will mark this issue as resolved as you have solved my original questions. Thanks again for all the help!
Was this helpful to you?
Quote

Question owner

For anyone trying to accomplish locking down TB using a userChrome.css this was my final code. I hope it helps someone else!

/*

* Do not remove the @namespace line -- it's required for correct functioning
*/

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */


/* Hide the specific menus */ menu[label="Go"], menu[label="Help"], menu[label="Chat status"], menu[label="Developer Tools"], menu[label="Add-on Options"], menu[label="Toolbars"], menu[label="Headers"], menu[label="Get New Messages for"], menu[label="Offline"], menu[label="New"] {display: none !important;}

/* Hide specific menu items */ menuitem[label="Settings"], menuitem[label="Folder Properties"], menuitem[label="Add-ons"], menuitem[label="Add-on Options"], menuitem[label="Activity Manager"], menuitem[label="Message Filters"], menuitem[label="Run Filters on Folder"], menuitem[label="Run Filters on Message"], menuitem[label="Run Junk Mail Controls on Folder"], menuitem[label="Delete Mail Marked as Junk in Folder"], menuitem[label="Account Settings"], menuitem[label="Options"], menuitem[label="Compact Folders"], menuitem[label="Properties"] {display: none !important;}

/* Remove Account main page */

  1. acctCentralGrid,

.acctCentralText, .acctCentralRowTitleBox {display: none !important;}

For anyone trying to accomplish locking down TB using a userChrome.css this was my final code. I hope it helps someone else! /* * Do not remove the @namespace line -- it's required for correct functioning */ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */ /* Hide the specific menus */ menu[label="Go"], menu[label="Help"], menu[label="Chat status"], menu[label="Developer Tools"], menu[label="Add-on Options"], menu[label="Toolbars"], menu[label="Headers"], menu[label="Get New Messages for"], menu[label="Offline"], menu[label="New"] {display: none !important;} /* Hide specific menu items */ menuitem[label="Settings"], menuitem[label="Folder Properties"], menuitem[label="Add-ons"], menuitem[label="Add-on Options"], menuitem[label="Activity Manager"], menuitem[label="Message Filters"], menuitem[label="Run Filters on Folder"], menuitem[label="Run Filters on Message"], menuitem[label="Run Junk Mail Controls on Folder"], menuitem[label="Delete Mail Marked as Junk in Folder"], menuitem[label="Account Settings"], menuitem[label="Options"], menuitem[label="Compact Folders"], menuitem[label="Properties"] {display: none !important;} /* Remove Account main page */ #acctCentralGrid, .acctCentralText, .acctCentralRowTitleBox {display: none !important;}
Was this helpful to you?
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.