Need to disable Private Window/Private Browsing on our work computers, both mac and pc?
I support both macs and pcs with version 26 of firefox on all machines. I need to disable private window and private browsing, including the keyboard shortcuts.
Выбранное решение
If you hide menu items and buttons with code in userChrome.css then the menu shortcuts will still work.
You can only disable keyboard shortcuts with an extension.
See also:
- http://mike.kaply.com/2013/02/11/add-ons-in-the-distribution-directory/
- http://mike.kaply.com/2012/02/09/integrating-add-ons-into-firefox/
Все ответы (6)
I failed to mention I would like to do this with out an add on....some of my users will just disable the add on.
https://support.mozilla.com/en-US/search?a=2&q=
Search Support Questions in this forum for disable Private Browsing. There have been a good number of threads where that was discussed at length after Private Browsing was first introduced.
Or open the XPI (a Zip package) and view the code RichieB2B used when he created that extension. You can save an extension to disk by using right-click and Save Link As..., rather than clicking on + Add to Firefox.
Also, try out the 1.7.1 version - https://addons.mozilla.org/en-us/firefox/addon/disable-private-browsing-pl/versions/?page=1#version-1.7.1 - which hides the Disable and Delete buttons in Add-on. Mozilla Add-ons staff forced Richie to not hide those buttons, and prior to that Richie had the entire extension hidden when not in SafeMode. Mozilla Add-ons had a "fit" over that, too.
I did some of the preliminary testing when that extension first appeared in July 2011. The first two versions of that extension, from July and August 2011, were pulled from Mozilla Add-ons.
Thank you for the info. I did run across in my searching another way to disable by creating a txt file (userChrome.ccs) with this code, minus the first sentence: (Open the file on any text editor. Copy and paste the following lines after @namespace
/* 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;}
)
I need to try it on my mac before I implement it on other macs and the pcs. The directory placement area was a little vag so I tried it here.
I placed the file in: HD/Users/{me}/Library/Application Support/Firefox/chrome restarted firefox. Did not work.
Does any one know if the above into is correct and if I placed it in the correct area on the mac?
This is the info I got to place the same file on the pc: C:\\Users\\[User]\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\[random string].default\\chrome\\
Does anyone know if this is correct? I can not test this until after hours on the pc.
Thank you again! I really tried to do the research before I posted the question.
As far as your code goes, Start Private Browsing was moved from the Tools menu to the File menu - New Private Window - in Firefox 19, so that part of the code needs the correct #ID, which I can't help you with.
Then you need to deal with the Clear Recent History menu items and the keyboard command - Windows = {Ctrl + Shft + Delete}
The file paths to the /chrome/ folder look good, except in Windows slashes rather than double back-slashes. Those are only needed for "Values" in about:config .
Выбранное решение
If you hide menu items and buttons with code in userChrome.css then the menu shortcuts will still work.
You can only disable keyboard shortcuts with an extension.
See also: