我相信這可能是問題:Chrome擴展明顯的錯誤:content_script [0] .matches [0]
"content_scripts" : [
{
"matches" : [
"http://195.88.55.16"
],
"js" : ["script.js"],
"run_at" : "document_idle",
"all_frames" : false
}
我相信這可能是問題:Chrome擴展明顯的錯誤:content_script [0] .matches [0]
"content_scripts" : [
{
"matches" : [
"http://195.88.55.16"
],
"js" : ["script.js"],
"run_at" : "document_idle",
"all_frames" : false
}
您需要添加一個斜槓(可能削減+星)到主機的matches
部分,以使模式有效。
"matches" : [
"http://195.88.55.16/*"
],
欲瞭解更多信息,看看該文檔match patterns:
Here's the basic syntax:
<url-pattern> := <scheme>://<host><path> <scheme> := '*' | 'http' | 'https' | 'file' | 'ftp' | 'chrome-extension' <host> := '*' | '*.' <any char except '/' and '*'>+ <path> := '/' <any chars>
謝謝,我想這會工作。我唯一的想法是,這將使其對網站的所有子頁面有效,而我希望它只能在首頁運行。雖然不是一個大問題。 – user1831804
僅用於首頁,省略尾部星號;只需使用斜線。 –
像我原來的代碼,沒有工作? – user1831804
什麼是你的問題? –