我们建立了一个镀铬扩展,只能由选择性人员在我们公司内部使用.我们不希望在Chrome网上商店发布此内容.我们之前只需将crx文件拖放到扩展页面即可.
但在最新版本的chrome(我使用35.x)中,我们再也无法做到这一点.每当我们尝试安装crx文件时,chrome会自动禁用它并显示一条消息
"此扩展程序未列在Chrome网上应用店中,可能是在您不知情的情况下添加的"
一个链接到https://support.google.com/chrome/answer/2811969在那里说
"您看到此通知是因为您的一个或多个Chrome扩展程序已关闭,以使Chrome更安全.这些扩展程序不是来自Chrome网上应用店,也未经您的许可安装."
那么,这是否意味着我们永远不能从现在开始安装crx文件?没有解决方法?
我知道我们可以使用组策略方法安装,但这是我们能做到这一点的唯一方法吗?
提前致谢.
我正在尝试为浏览器的Web扩展测试示例代码.但是,它不起作用.我检查了控制台的谷歌浏览器和Firefox.它不打印任何东西.以下是我的代码:
manifest.json:
{
"description": "Demonstrating webRequests",
"manifest_version": 2,
"name": "webRequest-demo",
"version": "1.0",
"permissions": [
"webRequest"
],
"background": {
"scripts": ["background.js"]
}
}
Run Code Online (Sandbox Code Playgroud)
background.js:
function logURL(requestDetails) {
console.log("Loading: " + requestDetails.url);
}
chrome.webRequest.onBeforeRequest.addListener(
logURL,
{urls: ["<all_urls>"]}
);
console.log("Hell o extension background script executed");
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?
firefox-addon google-chrome-extension google-chrome-devtools firefox-developer-tools firefox-addon-webextensions