2

Is it possible to disable selected firefox extensions from acting upon local files starting with file:// as this might be security issue?

Any suggestions?

Google Chrome has this feature, unfortunately I am unable to do this for firefox.

Is it possible to enable and disable this feature for individual extensions?

1 Answer 1

3

The local files have no domain. You can verify it by opening the console with F12 when displaying a local file and executing this command : console.log(document.domain).
So we can restrict extension when there is no domain :)

Open a new tab and type about:config in the address bar.
Accept to take risk when Firefox warns you.
In the new window, search for an option called extensions.webextensions.restrictedDomains. You will see that there are already several domains listed here, mainly around Mozilla websites. Edit the value and in the end, append a simple comma :
restrictedDomains option ending with a comma

From now on, Firefox will restrict extensions for pages that have no domain, including local files.

2
  • Is it possible to enable and disable this feature for individual extensions?
    – Porcupine
    Commented Apr 17, 2021 at 10:15
  • If there is a way to do it, I don't know it. It's less straightforward, but you could simply have two Firefox profiles, one with the restriction on no-domain, one without, and install your extensions for only one of the profiles...
    – FloT
    Commented Apr 18, 2021 at 21:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .