Skip to content Skip to sidebar Skip to footer

How To Access The Manifest.json File Of A Firefox Extension?

I am making a short research about Chrome and Firefox extensions. I can access the manifest.json file of a Chrome extension installed on my Chrome browser with this URL chrome-exte

Solution 1:

The URLs used for files inside WebExtensions add-ons are in the format:

moz-extension://<extension UUID>/<pathToFileInExtension>

If you are in code within the extension, you can obtain the URL to any file in your extension with chrome.extension.getURL(). This will effectively give you the UUID for your extension.

If you are wanting to access a file through typing it into the URL bar of the Firefox Browser UI, then you will need to obtain the UUID for the extension you desire. For WebExtensions, the mapping from extension ID to UUID is available from about:config in extensions.webextensions.uuids. The value for that key is a JSON formatted Object with keys that are the WebExtension IDs and the value for each key is that WebExtensions' UUID.

If you are wanting to generally access files within a particular extension, you may be better off finding the extensions packed archive (usually [extensionID].xpi) which will, normally, be located in your [profileDirectory]/extensions. You will then need to unpack the archive (a normal .zip archive with the file extension changed) to access the files. Doing this may be easier than trying to crawl through the files by entering their URLs one-by-one in the URL bar.


Post a Comment for "How To Access The Manifest.json File Of A Firefox Extension?"