2010-08-05 38 views

回答

20

API

參考擴展文件

獲取一個擴展的文件使用chrome.extension.getURL()的URL。您可以像使用其他網址一樣使用結果。

因此chrome.extension.getURL("options.html");應該做的伎倆。

5

這個工作對我來說,打開的選項作爲一個新的標籤:

chrome.tabs.create({ 
     url: "options/index.html" 
}) 
3

剛剛加入的manifest.json

「web_accessible_resources」: 「options.html」]

,這將工作from contentscript.js

window.open(chrome.extension.getURL(「options.html」));

相關問題