将Google Chrome扩展程序转换为Firefox或Safari扩展程序 [英] Convert Google Chrome Extension to Firefox or Safari extension

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

问题描述

是否可以将Google Chrome浏览器扩展程序转换为Firefox或Safari浏览器扩展程序? -on基本上是基于JavaScript核心的,但Firefox在设计上更具可扩展性。 Gecko引擎和XUL(Mozilla的XML用户界面语言)允许您对扩展程序有更大的自由度,而Chrome(和WebKit)则试图对其应用程序进行沙盒处理。



所以,是的,只要Firefox提供了一个API,就可以将Chrome扩展程序制作成Firefox扩展程序。只需将Chrome的DevTools SDK特定内容替换为 Firefox的Jetpack 特定于SDK的内容(比如系统调用,或者你在扩展中做的其他任何事情)。

反之,并不总是如此。根据Firefox扩展中的功能,不能总是将其转换为在Chrome中工作。


Is it possible to convert a Google Chrome extension to a Firefox or Safari browser extension?

解决方案

Both Chrome and Firefox add-ons are essentially based on a JavaScript core, but Firefox is, by design, much more extensible. The Gecko engine and XUL (Mozilla's XML User Interface Language) allow for a much larger degree of freedom in what you can do with your extension, while Chrome (and WebKit) try to sandbox the working of its 'apps'.

So, yes, a Chrome extension can almost definitely be made into a Firefox extension, provided Firefox provides an API for whatever it is that you are trying to do. Just replace the Chrome's DevTools SDK-specific content with Firefox's Jetpack SDK-specific content (such as system calls or whatever else it is that you do within your extension).

The opposite, on the other hand, is not always true. Depending on the functionality in a Firefox extension, it cannot always be converted to work in Chrome.

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

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