jquery没有在chrome扩展中加载

时间:2012-05-19 12:48:21

标签: jquery google-chrome

我正在尝试将本地jquery文件加载到chrome扩展程序中。这就是我的manifest.json的样子:

{
  "name": "TV",
  "version": "0.1",
  "description": "Search",
  "icons": { "128": "icon.jpg" },
    "options_page": "options.html",
  "browser_action": {
    "default_title": "TV",
    "default_icon": "icon.jpg",
    "default_popup": "popup.html"
  },
  "permissions": [
    "http://*.thetvdb.com/*", "tabs"
  ],
"content_scripts": [ {
    "matches": [ "http://*/*", "https://*/*", "*://jquery.com/*"],
    "js": [ "jquery.js", "options.js" ]
  }]
}

和options.js中的函数:

function searchS(){
    console.log($)
}

然后我回报: 未捕获的ReferenceError:$未定义

有什么建议吗?谢谢!

0 个答案:

没有答案