2

Actually I am trying to add bookmark by javascrip.previously this window.sidebar.addPanel was working with old browser versions. But with the recent browser versions it is not working any more.

And

<a href="window.location.href" rel="sidebar">BooMark this</a>

is working in firefox but not in chrome.So I need a complete crossbrowser solution for adding bookmark.

Dhaval Marthak
  • 17,246
  • 6
  • 46
  • 68
Abhisek Malakar
  • 867
  • 1
  • 10
  • 18

1 Answers1

3

To answer the problem of adding bookmarks cross-browser, this answer should help you. The various browsers use different methods for this, and you need to try them all.

Community
  • 1
  • 1
unwitting
  • 3,346
  • 2
  • 19
  • 20
  • The question correctly states that window.sidebar.addPanel is not working any more. The answer referred by UNWITTING uses window.sidebar.addPanel. So it must be obsolete. – Dima Feb 07 '14 at 00:45
  • @Dima no, the answer I refer to states that one must use different approaches for the browsers in which sidebar.addPanel doesn't work. Only firefox even defines window.sidebar, so it's the only place you can use addPanel. – unwitting Feb 07 '14 at 10:16
  • I have contacted the Mozilla Firefox Support Forum: https://support.mozilla.org/en-US/questions/985670 Basically it looks like currently there is even no reliably way to determine the Browser. And the addPanel IS obsolete. – Dima Feb 08 '14 at 16:37