Report 2 problems related to Firefox extension development

wei_huang at trendmicro.com.cn wei_huang at trendmicro.com.cn
Thu Nov 9 02:07:38 UTC 2017


Hi Luca

Excellent! It works now.

So appreciate for all your help!

Regards
Wei Huang

From: Luca Greco [mailto:lgreco at mozilla.com]
Sent: 2017年11月8日 22:55
To: Wei Huang (RD-CN) <wei_huang at trendmicro.com.cn>
Cc: Mike Lissner <mike at free.law>; dev-addons at mozilla.org
Subject: Re: Report 2 problems related to Firefox extension development

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*<http://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

=======================================================

This message has been analyzed by Deep Discovery Email Inspector.



<table class="TM_EMAIL_NOTICE"><tr><td><pre>
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
</pre></td></tr></table>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171109/5301b8f3/attachment-0001.html>


More information about the Dev-addons mailing list