block file:///c:/ in Firefox
Is there any way to block file:///c:/ in Firefox via firefox.cfg, userchrome or usercontent.css configuration file, it would be very useful. Thanks in advance Regards
Wybrane rozwiązanie
You can do it with the WebsiteFilter in Windows Group Policy or a policies.json file. Here are the match patterns as you would express them in a policies.json file (for Firefox 83 and later):
{ "policies": { "WebsiteFilter": { "Block": [ "file:///C:/*", "view-source:file:///C:/*" ] } } }
References:
- https://github.com/mozilla/policy-templates#websitefilter
- Customizing Firefox Using policies.json
- Customizing Firefox Using Group Policy (Windows)
Wszystkie odpowiedzi (3)
Wybrane rozwiązanie
You can do it with the WebsiteFilter in Windows Group Policy or a policies.json file. Here are the match patterns as you would express them in a policies.json file (for Firefox 83 and later):
{ "policies": { "WebsiteFilter": { "Block": [ "file:///C:/*", "view-source:file:///C:/*" ] } } }
References:
It works perfectly. What is the difference between what is applied in policies.json and what is applied in firefox.cfg or in usercontent.css or userchrome.css? Thanks
Hello,
Policies.json is a file that contains the policies that an administrator has set. Note that on windows, you may also be able to use the group policy editor for the same purpose.
Firefox.cfg is used for mass configuration on networks, see more here Customizing Firefox Using AutoConfig
usercontent.css is a file that can not do either of these things, and is instead a file that is loaded into websites in order to change their appearance. In this file, you can specify a website and use css to persistently change elements in css. As an example, I am right now using support.mozilla.org in a dark mode, something not possible normally, as Firefox disables extensions from accessing support.mozilla.org.
userchrome.css is a similar file to usercontent, but instead of changing the websites, it changes the user interface of Firefox (named chrome). As an example, I am using the tweak Lepton (aka proton-fix) in photon look because I dislike the new look. Because of the userchrome.css file, I can have the browser look like whatever I want.