Chrome扩展程序 - 权限问题

时间:2013-05-27 16:17:16

标签: javascript jquery google-chrome-extension

我正在建立一个扩展。扩展的一部分是使用Javascript显示VOIP服务器的输出。

我正在使用这个:https://github.com/CommandChannel/Mumble-Channel-Viewer/wiki

我调整了内容,以便JS在我的popup.js文件中,以及声明的var(所以没有内联JS)。

服务器的JSON输出位于:http://api.lethal-zone.eu/mumble/?view=json&serverId=1,修改为:http://api.lethal-zone.eu/mumble/?view=json&serverId=1?callback=?正如指示所说。

但是,我收到了错误:

Refused to load the script 'http://api.lethal-zone.eu/mumble/?view=json&serverId=1?callback=jQuery1910587204567855224_1369671235456&_=1369671235457' because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".

现在我已经完成了很多工作,如果域不是https://(?)

,似乎不允许JSONP回调

我的清单具有以下权限:

"permissions": [
    "http://*.lethal-zone.eu/*", 
    "https://*.lethal-zone.eu/*",
    "http://api.lethal-zone.eu/mumble/",
    "notifications",
    "storage"
],

有没有人知道如何在没有https的情况下这样做?或者我应该在哪里看?

编辑:没有太多要显示的代码,我有我的div:<div id="mumbleTree"></div>,然后使用var mumbleChannelViewerJsonUri = "http://api.lethal-zone.eu/mumble/?view=json&serverId=1?callback=?";加载来自https://github.com/CommandChannel/Mumble-Channel-Viewer/blob/master/JavaScript/mumbleViewer.js的javascript,如以下说明中所述:{{3} }

干杯

0 个答案:

没有答案
相关问题