1
我試圖將jQuery添加到我的瀏覽器擴展程序,無法jQuery的文件添加到Chrome擴展
,這裏是我的manifest.json
{
"name": "OSpy",
"description": "",
"version": "1",
"manifest_version": 2,
"background":{
"scripts":["background.js"]
},
"js": ["js/jquery-1.10.2.min.js"]
"browser_action": {
"default_title": "Object Spy"
},
"permissions":["tabs","<all_urls>"],
"web_accessible_resources": [
"img/bt.png"
"js/jquery-1.10.2.min.js"
]
}
問題是,它是給予,
Uncaught ReferenceError: $ is not defined
試試這個:http://stackoverflow.com/questions/4947510/load-jquery-into-a-chrome-extension – Falaque