Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7188507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:05:59+00:00 2026-05-28T19:05:59+00:00

I can’t manage to load jQuery in a Google Chrome userscript. This is how

  • 0

I can’t manage to load jQuery in a Google Chrome userscript.

This is how my manifest.json looks:

{
    //...
    "content_scripts" : [{
        "js" : ["http://code.jquery.com/jquery-1.7.1.js", "code.js"],
        //...
    }],
    //...
}

But in code.js, $ is undefined.

code.js otherwise works, and actually I have a bookmarklet working (that uses the site’s version of jQuery).

I’ve tried minified and unminified versions of jQuery, hosted or local.

I’ve also tried embedding a minified jQuery at the top of my code.js, but if I do that the code does not even run, actually the whole file does not run (even an alert before the chunk of minified jQuery).

If you want to look at it, here it is.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:06:02+00:00Added an answer on May 28, 2026 at 7:06 pm

    From the manifest.json provided in your zip, Chrome sends me two errors when unpacking.

    1. Invalid value for ‘content_script[0].matches[0]’: Missing scheme seperator.
    2. Could not load javascript ‘http://code.jquery.com/jquery-1.7.1.js‘ for content script.

    The first one says your matches statement isn’t correctly formatted. After your * you should add :// like so:

    "matches" : ["*://my.deviantart.com/messages/*"]
    

    The second one is about you trying to load the jquery from an external recource. If you change the path to your local file it should work.

    "js" : ["jquery.js", "code.js"],
    

    When I console.log($) in your code.js file after these adjustments jquery seems to work just fine.

    EDIT:
    Note that you need to add to your html (in <head> section) the following:

    <script src='./jquery.js'></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can someone explain why the compiler accepts only this code template<typename L, size_t offset,
Can anyone can confirm the best idea for storing jquery code, initially i was
can any one tell me how can change this java code into objective c.is
I have a jquery bug and I've been looking for hours now, I can't
Can anyone give me an example of how to return the following json simply
Can I run this in a Windows command prompt like I can run it
Can anybody help me? What should be the datatype for this type -07:00:00 of
Can't figure out how to do this in a pretty way : I have
Can i get the source code for a WAMP stack installer somewhere? Any help
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.