Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/373.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 此扩展不支持';你不为我工作吗?_Javascript_Json_Google Chrome_Google Chrome Extension - Fatal编程技术网

Javascript 此扩展不支持';你不为我工作吗?

Javascript 此扩展不支持';你不为我工作吗?,javascript,json,google-chrome,google-chrome-extension,Javascript,Json,Google Chrome,Google Chrome Extension,这在my manifest.json中: { "manifest_version": 2, "name": "ROBLOX Forum Link Fixer", "description": "Fixes the amp; issue on the ROBLOX forum.", "version": "2.0", "background": { "scripts": [ "jquery.js", "fixer.js" ] },

这在my manifest.json中:

{
  "manifest_version": 2,

  "name": "ROBLOX Forum Link Fixer",
  "description": "Fixes the amp; issue on the ROBLOX forum.",
  "version": "2.0",

  "background": {
    "scripts": [
      "jquery.js",
      "fixer.js"
    ]
  },
  "permissions": [
    "http://*.roblox.com/*",
    "https://*.roblox.com/*"
  ]
}
这是fixer.js的内部(jquery.js只是jquery):


错误是它不起作用,我不知道为什么?!我希望有人能帮忙!谢谢。

我认为您必须像这样使用内容脚本权限

"content_scripts": [
    {
      "matches": ["http://www.google.co.in/*",
       "https://www.google.co.in/*"],
      "js": ["myscript.js"]
    }
  ]
}

而不是背景-请参见h

内容脚本,而不是背景脚本。@dsg所以只需将背景更改为内容?我还不擅长谷歌chrome的扩展功能。这是我的第一本。请花点时间阅读。
"content_scripts": [
    {
      "matches": ["http://www.google.co.in/*",
       "https://www.google.co.in/*"],
      "js": ["myscript.js"]
    }
  ]
}