Chrome扩展程序安装 [英] Chrome Extension installation

查看:157
本文介绍了Chrome扩展程序安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用安装程序安装的Chrome扩展程序,它安装了一些进程和浏览器扩展。根据Chrome安全更改,独立安装将被阻止。 保护windows用户从恶意.htmlrel =nofollow> Chromium博客


如果您的扩展程序目前位于Chrome网上应用店之外,则应尽快迁移它们。对您的用户不会有任何影响,他们仍然可以使用您的扩展程序,就像没有任何更改一样。如果您愿意,您可以将扩展程序隐藏在网上商店列表中。如果您从自己的网站安装了专用安装流程,则可以使用现有的内联安装功能。


所以,基本上,您需要做的是:


  1. 在Chrome网上应用店中托管您的扩展程序(可选,从列表中隐藏它) li>
  2. 让您的安装程序打开指向您网站上的网页的Chrome浏览器窗口。

  3. 在该页面上提供用户启动的所有必要信息和数据扩展程序的安装过程。 (这里的关键概念是 user 必须通过点击按钮来启动安装过程。



< hr>

嵌入式安装如何工作: $ b

要在其上进行内联安装的网站上的HTML页面必须在引用用户可以安装的项目的部分中包含一个或多个标记,每个标记必须具有以下格式:




 < link rel =chrome-webstore-itemhref =https://chrome.google。 com / webstore / detail / itemID> 




安装时,必须调用chrome.webstore.install(url,successCallback,failureCallback)函数该函数只能响应用户手势进行调用,例如在点击事件处理程序中;异常如果不是这样,将被抛出。


(强调我的)



有关 内嵌安装功能

I have chrome extension which get installed with using installer which install some process and browser extensions. As per chrome security changes stand alone installation will be blocked.Google to block local Chrome extensions

If we host extension on chrome store what are the ways we can redirect chrome from installer to install extension.

解决方案

According to the Chromium Blog:

If your extensions are currently hosted outside the Chrome Web Store you should migrate them as soon as possible. There will be no impact to your users, who will still be able to use your extension as if nothing changed. You could keep the extensions hidden from the Web Store listings if you like. And if you have a dedicated installation flow from your own website, you can make use of the existing inline installs feature.

So, basically, what you need to do is:

  1. Host your extension on the Chrome Web Store (optionaly keeping it hidden from the listings).
  2. Have your installer open a Chrome browser window pointing to a webpage on your site.
  3. On that page have all necessary info and data for the user to initiate the extention's installation process. (The key concept here is that the user has to initiate the installation process, e.g. by clicking a button.


How does inline installation work:

The HTML page on your site from which you want inline installation to occur must contain one or more tags in the section referencing the items that the user can install. Each tag must have the following format:

<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/itemID">

To actually begin inline installation, the chrome.webstore.install(url, successCallback, failureCallback) function must be called. This function can only be called in response to a user gesture, for example within a click event handler; an exception will be thrown if it is not.

(emphasis mine)

More info on the inline installs feature.

这篇关于Chrome扩展程序安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆