We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

I want to take away the option for Start Private Browsing from Tools

more options

I don't want my teenagers to have the option to use Private Browsing but want to be able to use it for banking etc. I really just don't want it to be available from Tools

I don't want my teenagers to have the option to use Private Browsing but want to be able to use it for banking etc. I really just don't want it to be available from Tools

被選擇的解決方法

That userChrome.css code probably won't work on a Mac because not Firefox but the OS maintains the menu bar.

從原來的回覆中察看解決方案 👍 1

所有回覆 (10)

more options

You can add the following two lines of code to userChrome.css, this will remove the Private Browsing options from the menus. This code needs to go below the line that begins with @namespace. For details on this file including its location, see http://kb.mozillazine.org/UserChrome.css

#sanitizeSeparator, #privateBrowsingItem, #sanitizeItem {display:none!important;}
#privateBrowsingAutoStart {display:none!important;}


For details on editing configuration files such as userChrome.css, see http://kb.mozillazine.org/Editing_configuration

You can still use the keyboard shortcut (Command+Shift+P) to toggle private browsing.

more options

選擇的解決方法

That userChrome.css code probably won't work on a Mac because not Firefox but the OS maintains the menu bar.

more options

Thanks anyway...

more options

I don't think this addressed the problem or at least in language I can understand. Please don't assume we are all computer experts. Could you give more basic instructions for this solution. What and where is userChrome.css?

more options

TonyE provided a link that explains userChrome.css
http://kb.mozillazine.org/UserChrome.css

You also need to read this about editing those types of files.
http://kb.mozillazine.org/Editing_configuration

more options

That userchrome.css code worked in FF 3, but doesn't appear to work in FF 5. I have tried taking the same userchrome.css file that killed Private Browsing in FF 3 and placing it in the \<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile name>\chrome directory (using a Win 7 machine) but either FF 5 doesn't recognize it or the CSS has changed because of the new interface.

Does anyone have any suggestions?

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

/* Hide Private Browsing in App menu and Tools menu */
#appmenu_privateBrowsing, #privateBrowsingItem  {display:none!important;}

/* Hide Sanitize item in App menu and Tools menu */
#appmenu_sanitizeHistory, #sanitizeSeparator, #sanitizeItem {display:none!important;}
more options

This extension disables Private Browsing, hides all the PB menu items and disables the keyboard controls, disables the clearing of browsing history, and the extension doesn't appear in the Add-ons except for the Firefox SafeMode.
https://addons.mozilla.org/en-US/firefox/addon/disable-private-browsing/

more options

This thread was originally about only removing Private Browsing from the menus and not to disable that feature completely, because the OP still wanted to use PB mode for visiting some websites.

but want to be able to use it for banking etc. I really just don't want it to be available from Tools
more options

Yes it was, but it has been revived twice. I posted about an extension that was just released, in case anyone wants to block PB.