我通过"browser_action"
中的manifest.json
选项加载了弹出窗口。 HTML文件加载,FIRST脚本标记我声明加载,但其他两个js文件后面没有加载。 javascript被加载到文件的底部,如下所示:
<script type="application/x-javascript" src="const.js"/>
<script type="application/x-javascript" src="core.js"/>
<script type="application/x-javascript" src="options.js"/>
并且清单看起来像这样:
{
"manifest_version": 2,
"name": "myExtension",
"version": "1.1",
"description": "myExtension",
"icons": {
"32": "chrome/skin/myExtension.png"
},
"permissions": [
"activeTab"
],
"browser_action": {
"default_icon": "chrome/icons/default/myExtension.ico",
"default_title": "myExtension",
"default_popup": "chrome/content/options.html"
}
}