Json File For Chrome主题无效

时间:2015-12-09 16:34:47

标签: json google-chrome syntax

我正在尝试为学校创建Chrome主题。我查看了谷歌开发者网站的主题(http://developer.google.com/extensions/themes),并且我复制了一个示例代码以查看它是否有效。我更改了名称和它引用的图像以测试它,当我上传解压扩展时,它给出了错误代码“无效语法”。我的代码如下:

{
 "version": "2.6",
 "name”: “aaron speed“,
 “manifest_version”: “2”, 
 "theme": {
     "images" : {
       "theme_frame" : "images/main_wallpaper.png”,
       "theme_frame_overlay" : "images/main_wallpaper.png",
       "theme_toolbar" : "images/theme_toolbar_camo.png",
       "theme_ntp_background" : "images/main_wallpaper.png”,
       "theme_ntp_attribution" : "images/main_wallpaper.png"
     },
     "colors" : {
       "frame" : [71, 105, 91],
       "toolbar" : [207, 221, 192],
       "ntp_text" : [20, 40, 0],
       "ntp_link" : [36, 70, 0],
       "ntp_section" : [207, 221, 192],
       "button_background" : [255, 255, 255]
     },
     "tints" : {
       "buttons" : [0.33, 0.5, 0.47]
     },
     "properties" : {
       "ntp_background_alignment" : "bottom"
     }  
   }
 }

编辑:我没有足够的代表发布图片,这里是错误消息: http://i.imgur.com/WD0LDo9.png?1

1 个答案:

答案 0 :(得分:0)

尝试将所有替换为",如下所示:

{
 "version": "2.6",
 "name": "aaron speed",
 "manifest_version": "2", 
 "theme": {
     "images" : {
       "theme_frame" : "images/main_wallpaper.png",
       "theme_frame_overlay" : "images/main_wallpaper.png",
       "theme_toolbar" : "images/theme_toolbar_camo.png",
       "theme_ntp_background" : "images/main_wallpaper.png",
       "theme_ntp_attribution" : "images/main_wallpaper.png"
     },
     "colors" : {
       "frame" : [71, 105, 91],
       "toolbar" : [207, 221, 192],
       "ntp_text" : [20, 40, 0],
       "ntp_link" : [36, 70, 0],
       "ntp_section" : [207, 221, 192],
       "button_background" : [255, 255, 255]
     },
     "tints" : {
       "buttons" : [0.33, 0.5, 0.47]
     },
     "properties" : {
       "ntp_background_alignment" : "bottom"
     }  
   }
 }

这些是不同的角色。我不知道您编辑代码时使用了哪种编辑器,但我认为您使用的是word或wordpad或类似内容......

相关问题