2012-09-14 20 views
0

我的Chrome擴展程序是當你點擊它時,它所做的一切就是打開一個URL。它曾經與web_url一起正常工作,但web_url未與清單版本2一起使用。 這裏是我目前的擴展清單:如何將chrome應用程序更新爲清單2

"name": "PTD", 
"version": "2.7.8", 
"manifest_version": 2, 
"description": "Pokemon Tower Defense 1 and 2!", 
"icons": {"128": "128.png"}, 
"default_locale": "en", 
"app": { 
    "urls": ["http://gamecorneronline.com/ptd.html"], 
    "launch": { 
     "web_url": "http://gamecorneronline.com/ptd.html" 
    }, 
    "permissions": ["unlimitedStorage","notifications"] 
} 

你能提供任何幫助嗎?

+1

您看過http://developer.chrome.com/extensions/manifest.html嗎? –

+0

btw你在哪裏看到'web_url'不能與清單版本2一起使用? –

回答

0

想通了。感謝您的幫助:

{ 
    "name": "PTD1/PTD2", 
    "description": "Play both PTD1 and PTD2!", 
    "version": "3.2", 
    "manifest_version": 2, 
    "app": { 
    "urls": [ 
     "http://example.com/", 
    ], 
    "launch": { 
     "web_url": "http://example.com/" 
    } 
    }, 
    "icons": { 
    "128": "icon_128.png" 
    }, 
    "permissions": [ 
    "unlimitedStorage", 
    "notifications" 
    ] 
} 
+0

確切的問題是什麼,你是如何修復它的?請通過添加細節來擴展您的解決方案。這可能會在未來幫助其他人。此外,請考慮將其中一個答案標記爲「已接受」。 – andr

+0

嗯,它不工作。感謝提醒我標記答案。 我沒有得到什麼錯誤...這和我的舊的唯一區別是格式化。無論如何,我無法在網上找到答案(很容易),所以決定分享。我檢查了清單頁面,沒有任何工作。最終,我發現了一個谷歌問題,它對chromebooks說,如何添加一個快速鏈接。無論如何,問題解決了。 – PaulBGD

+0

斑點!在錯誤的清單中,'permissions'屬於*'app'屬性*,而在工作版本中,它們被聲明爲* *屬性'app'旁邊。此外,非工作版本具有'default_locale'屬性,但我懷疑這是問題。 – andr

相關問題