I’m reading a tutorial about Firefox extensions and one of the important files is chrome.manifest which looks like this:
content xulschoolhello jar:chrome/xulschoolhello.jar!/content/
skin xulschoolhello classic/1.0 jar:chrome/xulschoolhello.jar!/skin/unix/
skin xulschoolhello classic/1.0 jar:chrome/xulschoolhello.jar!/skin/mac/ os=Darwin
skin xulschoolhello classic/1.0 jar:chrome/xulschoolhello.jar!/skin/win/ os=WinNT
locale xulschoolhello en-US jar:chrome/xulschoolhello.jar!/locale/en-US/
Part of this file is a jar scheme which is the core of this question. I’m interested in the specification (semantics) and role of this scheme. In the above tutorial is only written:
It tells Firefox to look into the JAR file and read the files from the right path.
When I was looking for some more information about this scheme I found only things related to Java programming language but not the things related to Firefox extension.
Could you explain this scheme more in depth?
(I tagged it with jar too, but I will retag it if this is something different)
thank you
The
chrome.manifestfile tells Firefox where to look for an extension’s chrome files. These files can be packed (in a JAR file) or unpacked (on the filesystem, not in a JAR file). For unpacked extensions you just need to specify the path to the files on the filesystem. Thejar:scheme is how you tell Firefox that your chrome files are packed, where the JAR is located, and then where to find the files in the JAR. It has the following format:To take a concrete example, the Greasemonkey extension has the following line in its manifest:
This tells Firefox that Greasemonkey has a content directory in a JAR located at
chrome/greasemonkey.jar(path relative to the location of the manifest) in a top-level directory namedcontent.