繁体   English   中英

Chrome扩展程序清单返回错误

[英]Chrome Extension Manifest Returns Error

无论我做什么,清单都会返回以下错误:

 Could not load extension from 
 '/Applications/XAMPP/xamppfiles/htdocs/lab/chrome/test'. Manifest is not valid JSON.
 Line: 28, column: 2, Trailing comma not allowed.

但是我已经从chrome托管的开发站点中引用并复制了它。 我陷入了第一步。 以下是我的清单

{

  "manifest_version": 2,
  "name": "Same Extention",
  "version": "1",

  "default_locale": "en",
  "description": "A description",



 "content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "css": ["mystyles.css"],
      "js": ["jquery.js", "myscript.js"]
    }
  ],

}

我提到的Chrome文档: 此处此处

删除content_scripts数组末尾的逗号。

代替:

"content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "css": ["mystyles.css"],
      "js": ["jquery.js", "myscript.js"]
    }
  ],

尝试:

"content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "css": ["mystyles.css"],
      "js": ["jquery.js", "myscript.js"]
    }
  ]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM