English 中文(简体)
是否有等同的火狐AddonInstall 在铬扩展?
原标题:Is there an equivalent for firefox AddonInstall in chrome extensions?

在 Firefox < a href=""中,https:// developmenter.mozilla.org/en/Addons/Add-on_Manager" rel="nofollow" >此代码 可安装新加号 :

Components.utils.import("resource://gre/modules/AddonManager.jsm");  

AddonManager.getInstallForURL("http://www.foo.com/test.xpi", function(aInstall) {  
  // aInstall is an instance of {{AMInterface("AddonInstall")}}  
  aInstall.install();  
}, "application/x-xpinstall");  

我用它来做定制更新器,并且非常有效。现在我想问“坚固”是否有类似“铬扩展”的东西?“/坚固”

最佳回答

如果您查看", http://code.google.com/chrome/extensions/ management.html" rel="nofol"\\\ code>chrome。 management API - 它有各种扩展操纵功能, 但显著的扩展安装除外。 这绝对是有意的, Chrome 开发者不愿意允许写入“ 客户更新器 ” ( 一些很容易被滥用的东西 ) 。

只能通过 < a href=" http://code.google.com/chrome/extensions/webstore.html" 安装扩展名的有限解决方案 。 rel= “ no follow” code>chrome.webstore.stallment () - 您获得与任何网站相同的“ 服务 ” 。 您必须在您的背景页面上添加一个 标签 :

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

您可以拨打chrome.webstore.stall() <() ), 用户将会收到确认提示。 无法安装 Web Store 上没有的扩展名, 静音装置也一样 。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Private FireFox plugin

I m looking at getting a FireFox plugin developed - but is it possible to create a plugin that is for private use only, so only those I share it with have it and not open to the masses? Need this for ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Cross-browser development

I m developing a web application for a new service, starting from Firefox 3.5. The interface design is tableless, only using divs + CSS & performance-blessed practices. Now, while being ...

Cross browser way of setting IFrame to "about:blank"?

Does anybody know a proper, cross-browser way to "empty" an IFrame? Is "about:blank" recognized without error across all browsers? Is it valid to give an IFrame an empty src?

热门标签