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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
For Chrome:
From within a Chrome Extension, you can use chrome.management.getAll
to obtain a list of the installed extensions and apps.
For Safari:
There is no public API to do this in Safari, whether from a webpage or from within a Safari Extension.
However, you can code your Safari Extension such that you can detect whether your Safari extension is installed from your website.