Chrome扩展程序:清单是无效的JSON

时间:2015-07-28 20:47:39

标签: json google-chrome-extension

感谢您阅读我的问题。 它说Manifest不是有效的JSON。行:31,列:3,语法错误。 并在“权限”之后突出显示冒号。

{
  "manifest_version": "2.0",

  "name": "Getting started example",
  "description": "This extension shows a Google Image search result for the current page",
  "version": "1.0",

  "page_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html",
    "popup": "https://google.ca",
    "default_title": "Click here!"

  },

  // "background": {
  //   // "scripts": ["eventPage.js"],
  //   "persistent": false
  // },

  "content_scripts": [
    {
      "matches": ["http://*/*"],
      "css": ["core.css"],
      "js": ["core.js"],
      "run_at": "document_end",
      "all_frames": true
    }
  ]

  "permissions": [
    // "tabs",
    // "webRequest",
    "activeTab",
    "https://ajax.googleapis.com/"
  ]
}

1 个答案:

答案 0 :(得分:3)

你错过了","在content_scripts数组之后