2014-02-10 59 views
0

不管我做什麼,清單返回以下錯誤:Chrome擴展程序清單返回錯誤

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. 

但我已經提到,並通過鍍鉻主辦的開發站點複製它。我陷入了第一步。下面是我的清單

{ 

    "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"] 
    } 
    ], 

} 

鉻之證件我提到:Here & Here

回答

3

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"] 
    } 
    ] 
+0

感謝。工作:) – esafwan