html - 将带有我的 URL 的 ExtensionInstallSources 首选项添加到 Chrome 首选项后,仍然不允许安装 ".crx"打包的应用程序

标签 html google-chrome google-chrome-extension

我添加了首选项 ExtensionInstallSources(根据:http://www.chromium.org/administrators/policy-list-3#ExtensionInstallSources),它仍然不允许我从我的 URL 安装我的“app.crx”。我添加如下:

文件:/home/myuser/.config/google-chrome/Default/Preferences

"extensions": {
    "ExtensionInstallSources": [ "http://myurl.com/*" ],
...elided...

但是,当我转到 url http://myurl.com/myapp/app.crx 时,它告诉我无法从该 url 安装。我该如何解决这个问题?

更多信息:

Preferences 文件似乎不是要编辑的正确文件。我从这里下载了一个例子:http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip如此处指定:http://support.google.com/chrome/a/bin/answer.py?hl=en&answer=187945

它提供了一个“chrome.json”文件但没有指定安装位置。我尝试将它安装在 .config/chrome/Default 文件夹中,但这不起作用。

我的 chrome.js 文件是:

// Policy template for Linux.
// Uncomment the policies you wish to activate and change their values to
// something useful for your case. The provided values are for reference only
// and do not provide meaningful defaults!
{
    "ExtensionInstallSources": ["http://myurl.lamp/*"]
}

还是不行!

第二次更新:

我将设置放在 /etc/opt/chrome/policies/managed/test_policy.json 中,如下所示:http://www.chromium.org/administrators/linux-quick-start而且它仍然不起作用!

第三次更新:

我检查了 chrome://policy,它显示有权限!它仍然不会让我从 URL 安装 crx!它显示 ExtensionInstallSources 的值是:

http://myurl.lamp/*,http://localhost/*,http://192.168.1.109/*,*://myurl.lamp/*,file:///*

但这些都不起作用!

最佳答案

我刚刚在测试 ubuntu 虚拟机中使用 chrome unstable (35.0.1908.4) 尝试了这个,它运行良好。更改策略文件后是否重新启动了 chrome?

关于html - 将带有我的 URL 的 ExtensionInstallSources 首选项添加到 Chrome 首选项后,仍然不允许安装 ".crx"打包的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16489013/

相关文章:

jquery - 动态地为 CSS 提供值

javascript - Div 调整大小在 Internet Explorer 上不起作用

html - 100%高度依赖于兄弟元素的高度

javascript - chrome.tabs.query 如何显示所有选项卡的信息?

Javascript "if"语句失败

javascript - 如何只点击模态外观而不点击对话框/内容?

javascript - 在 Canvas 上绘制图像并导出打印质量图像

javascript - 如果未使用新运算符,则返回一个新对象

php - Chrome 的 JavaScript 问题

javascript - chrome 扩展多个选项卡和 chrome.runtime.connect