samedi 27 juin 2015

Content script inject jquery only when current tab has no jquery

I found out if I inject jquery from manifest, jquery will be injected even current page has already jquery. How can I avoid injecting duplicate js libs such as jquery?

"content_scripts": [
{
        "js": [
                "bower_components/jquery/dist/jquery.min.js",
                "scripts/content/inject.js"
              ],
}

Aucun commentaire:

Enregistrer un commentaire