api获取在浏览器中安装的扩展列表

api获取在浏览器中安装的扩展列表

本文介绍了api获取在浏览器中安装的扩展列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在开发chrome和safari的扩展程序.此应用程序中的一个步骤是获取所有已安装的扩展程序.是否有任何safari或chrome api可以提供已安装扩展程序的列表?在safari中,已安装的扩展存储在~/Library/Safari/Extensions/Extensions.plist中,但是我找不到任何相关的api.

I am developing an extension for chrome and safari.One step in this app is to get all the already installed extensions.Is there any safari or chrome api that can give the list of installed extensions? In safari installed extensions are stored in ~/Library/Safari/Extensions/Extensions.plist but i am not able to find any related api.

推荐答案

对于Chrome:

在Chrome扩展程序中,您可以使用 chrome.management.getAll 来获取已安装的扩展程序和应用程序的列表.

For Chrome:

From within a Chrome Extension, you can use chrome.management.getAll to obtain a list of the installed extensions and apps.

在Safari中,无论是从网页还是从Safari扩展程序中,都没有公共API可以做到这一点.

There is no public API to do this in Safari, whether from a webpage or from within a Safari Extension.

但是,您可以对Safari扩展进行编码,以便可以检测是否您的 Safari扩展程序已从您的网站安装.

However, you can code your Safari Extension such that you can detect whether your Safari extension is installed from your website.

这篇关于api获取在浏览器中安装的扩展列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 12:11