书签功能作为侧栏打开 [英] bookmark feature opening as a sidebar

查看:180
本文介绍了书签功能作为侧栏打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,我已在我的网站中实现了书签功能,但是当我点击工具栏中的书签链接时,它在边栏中作为新窗口打开,而不是作为mozilla Firefox中的新页面,

I have implemented a Bookmark feature in my website, but when I click on the bookmark link from the toolbar, its opening as a new window in a sidebar instead as an new page in mozilla firefox,

它在IE中相应地工作,任何一个请在这里帮助我

It is working accordingly in IE, Can any one please help me in this

推荐答案

AFAIK,你不能改变你的脚本的行为,因为firefox不公开其JavaScript API的网站的功能创建书签。 Firefox只允许您创建一个小页面,然后可以在侧边栏中打开。因此,您目前正在使用的API。

AFAIK, you cannot change the behavior of your script, because firefox doesn't expose in its JavaScript API for websites a function for creating bookmarks. Firefox only allows you to create a small page, that can be then opened in the sidebar. For that there is an API that you are currently using.

window.sidebar.addPanel(title, url, "");

如果你的网站运行在一个特权环境中(这是firefox插件的情况)可以使用书签管理器

If your website was running in a privileged environment (which is the case for firefox addons), it would be possible to use the bookmarkmanager.

Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
          .getService(Components.interfaces.nsINavBookmarksService);

这篇关于书签功能作为侧栏打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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