How to use jQuery in my addon


(Jewel Mahanta) #1

Hi, I was wondering how do I go about using jQuery in my addon. As of now, I simply downloaded a copy of it from the jQuery website (https://code.jquery.com/jquery-3.2.0.min.js) and then specified it in the js section of the content script, i.e.

"content_scripts": [
    {
      "matches": ["https://9anime.to/watch/*", "https://9anime.is/watch/*", "https://9anime.tv/watch/*"],
      "js": ["assets/js/jquery-3.2.0.min.js", "assets/js/content.js"]
    }
  ],

My add-on got rejected with this as one of the reason:

  1. Your add-on includes a JavaScript library file that doesn’t match any versions known to us. We require all add-ons to use unmodified release versions.
    jquery-3.2.0.min.js

What am I doing wrong? Please help me out.


(Noitidart) #2
  1. You need to go here - http://jquery.com/download/
  2. Right click on download and click save as - screenshot - http://i.imgur.com/gqvtFiE.png

Save it directly into your addon. Its checksum will match.


(Jewel Mahanta) #3

That’s what I did the first time. But sure I will do it again.


(Noitidart) #4

Did you modify the contents in anyway after saving it? That would alter the checksum.


(Jewel Mahanta) #5

No I didn’t touch it at all. I am going to try with jQuery 3.2.1 now and test the checksum to make sure its intact from here https://code.jquery.com/

I submitted it again with 3.2.0 along with the other suggested edit by the previous reviewer. Hope it passes this time.


(erosman) #6

JQuery 3.2.* hasnt been added to the hash list yet.

Which addon is it?


(Jewel Mahanta) #7

This is my add-on (https://addons.mozilla.org/en-US/firefox/addon/9anime-companion/). Its a really simple add-on :slight_smile:

Oh didn’t know that about jQuery 3.2 . So like jQuery 3.1 and below are fine?


(erosman) #8

JQuery 3.2.* is fine and it matches the original.

You have uploaded sources. That means addon is now in Admin review queue which can take longer.
I am not able to review it (I am not an admin).

There’s no need to include source code unless your add-on has minified, obfuscated or compiled code. Established libraries do not require inclusion of their sources. Please keep this in mind for the future, since add-ons that include additional sources enter a separate queue and tend to take longer to be reviewed.

Update:
Admin has moved the addon back to the normal queue


(Jewel Mahanta) #9

Thank you for the info. I will keep this is mind. May I ask if you will be reviewing my add-on?


(erosman) #10

I dont know… let’s see