0
我玩弄延长谷歌Chrome和我有一个简单的扩展与以下popup.html文件运行:谷歌Chrome扩展:popup.html JavaScript的jQuery的VS
<script type = "text/javascript">
alert("hi from popup.html");
</script>
<body>
Hello World
</body>
只要我添加src属性与谷歌jquery CDN的网址'alert(“你好来自popup.html”);'不再运行。
我的清单文件看起来像:
{
"name": "My First Extension",
"version": "1.0",
"description": "The first extension that I made.",
"background_page": "background.html",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"permissions": [
"tabs","http://*/*","https://*/*"
]
}
为什么加入jQuery的源打破弹出?
通常你只需将最新的'jquery.min.js'复制到你的扩展中,而不是从CDN中获取它。 – icktoofay 2011-04-30 23:34:20
这与Chrome或扩展无关。这是基本的Javascript:'