title: How to add to Favorites/Bookmark for all browser in javascript
body: <p>I have some query in Add to favorites/Bookmarked web page using java script.I just go through in this <a href="http://www.apphp.com/index.php?snippet=javascript-add-to-favorites-button" rel="nofollow">Link</a> and get this source code. It's been working perfectly for the last month. Yet now it will not work in any browser. Here is my code :</p>
  
  <pre><code>function CreateBookmarkLink(){
          var title = document.title;
          var url = document.location.href;
  
          if(window.sidebar){
              /* Mozilla Firefox Bookmark */
              window.sidebar.addPanel(title, url, "");
          }else if(window.external){
              /* IE Favorite */
              window.external.AddFavorite(url, title);
          }else if(window.opera &amp;&amp; window.print) {
              /* Opera Hotlist */
              alert("Press Control + D to bookmark");
              return true;
          }else{
              /* Other */
              alert("Press Control + D to bookmark");
          }
   &lt;a href="javascript:CreateBookmarkLink();"&gt;Add to Favorites/Bookmark&lt;/a&gt;
  </code></pre>
  
  <p>It doesn't work in any browser any more and just displays: </p>
  
  <blockquote>
    <p>TypeError: window.sidebar.addPanel is not a function<br>
    <strong>> window.sidebar.addPanel(title, url, "");</strong></p>
  </blockquote>
  
  <p>Any ideas how to solve it? I also need to add favorites in chrome browser. Any other idea to create bookmark for my website.</p>