Report 2 problems related to Firefox extension development

Luca Greco lgreco at mozilla.com
Wed Nov 8 14:55:22 UTC 2017


By looking at the manifest.json included in the zip file attached in your
previous email,
I see that the content script related to the facebook settings urls is the
only one where the jquery file is in camel case:

    TMToolbar/3rd_party/jQuery-3.2.1.js

while in the other content script is in lower case:

    TMToolbar/3rd_party/jquery-3.2.1.js

Here is the related fragments from the manifest.json:

        {
            "all_frames": true,
            "css": [],
            "js": [
                ...
                "TMToolbar/3rd_party/jquery-3.2.1.js",      <======== lower
case
               ...
            ],
            "matches": [
                "http://*/*",
                "https://*/*"
            ]
        },
        {
            "all_frames": false,
            "js": [
                ...
                "TMToolbar/3rd_party/jQuery-3.2.1.js",      <======== camel
case
                ...
            ],
            "matches": [
                "*://*.facebook.com/settings*"
            ],
            "run_at": "document_end"
        },

This would also explain why the issue is not triggered when the files are
loaded directly from the filesystem (e.g. when loading the extension
temporarily from a directory with the extension unpacked) because (at least
if I recall correctly) on OSX the filesystem is "case insensitive" and so
the jquery file is going to be found and loaded correctly even if the
filename is not in the right "case", but that is not true when the files
are loaded from the xpi and so it is going to fail to load the ones that
are not in the right "case" (which seems to be the case only for the one
related to the facebook settings urls).

Best,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171108/36eb3bf3/attachment.html>


More information about the Dev-addons mailing list