JSON清单文件我做错了什么?

时间:2015-10-29 14:53:59

标签: json google-chrome-extension

{
  "manifest_version": 1,
  "name": "Clock",
  "version": "1",

  "default_locale": "en",
  "description": "A Plain Analog Clock",
  "icons": {"128": "icon_128.png"},

  "browser_action": {
    "default_icon": {
        "128": "icon_128.png",  
    },
  },

  "author": Anonymous,
  "automation": Clock,
  "background": {
    "page": "Clock.html"
    "persistent": false
  },
  "background_page": Clock.html,
  },
}

这段代码我做错了什么?我不知道我是JSON的新手。我正在尝试在Google Chrome中构建扩展程序。

1 个答案:

答案 0 :(得分:0)

{
  // Required
  "app": {
    "launch": {
      "local_path": "Clock.html"
    }
  },
    "background": {
      // Optional
      "page": "Clock.html",
      "persistent": true
  },
  "manifest_version": 2,
  "name": "Clock",
  "version": "1222",

  // Recommended
  "description": "A clock",
  "icons": {"128": "icon_128.png"}
}

这是正确运行脚本的代码