Creating a Firefox sidebar 编辑

Since Firefox 57, the only way to create a Firefox sidebar is to create a WebExtension with the sidebar_action manifest.json key.

Web publishers can offer visitors a Firefox sidebar to encourage their engagement. There are two ways to create a sidebar for Firefox users: the Social API and an extension. You can choose either depending on your needs and resources.

An extension

An extension is a kind of add-ons that adds new functionalities to Firefox. There is a wide range of extensions available, and some of them provide a sidebar. Such kind of sidebar can be a simple Web panel or a full-featured extension that is completely integrated with the browser. There are some ways to create an extension:

The Social API

Obsolete since Gecko 57 (Firefox 57 / Thunderbird 57 / SeaMonkey 2.54)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

This content covers features introduced in Firefox 17.

The Social API is a new API from Mozilla that allows social media services to integrate their content into the browser window. At this time, Facebook, Cliqz, mixi and MSN are partnering with Mozilla as social providers. Now the API is available to all Web developers so it's worth checking out if you are offering a social service.

The window.sidebar API

Obsolete since Gecko 23 (Firefox 23 / Thunderbird 23 / SeaMonkey 2.20)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

As of Firefox 23, the addPanel and addPersistentPanel functions have been removed from the deprecated, Netscape-derived window.sidebar object. That means the ability to add a traditional sidebar panel is no longer available from Web content. The new Social API or an extension can be used instead as described above.

See Also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:184 次

字数:4635

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文