0
我有一個擴展,從站點獲取JSON數據,從菜單中選擇字符及其資源列表。我使用了一個單獨的html頁面,並嘗試用javscript更新它以修改菜單的代碼。唯一的問題是,我無法將內容腳本注入/加載到html頁面中。內容腳本沒有被注入到擴展html頁面
當我的擴展運行時,rem.htm文件的路徑顯示爲'moz-extension://a02e52b1-e41d-4d28-844b-a8466a1dd67b/rem.htm',它給出'在控制檯中匹配'鍵。
我還能使用什麼?
manifest.json的:
{
"description": "Resource Manager for Path of Exile",
"manifest_version": 2,
"name": "Path of Exile Resource Manager",
"version": "1.0",
"content_scripts":
[
{
"matches": ["file:///rem.htm"],
"js": ["modify-page.js"]
}
],
"background":
{
"scripts": ["background.js"]
},
"browser_action":
{
"default_icon":
{
"16": "icons/rem_16.png",
"32": "icons/rem_32.png",
"64": "icons/rem_64.png"
}
},
"permissions":
[
"*://www.pathofexile.com/",
"webRequest",
"tabs",
"activeTab"
]
}