JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<button type="button" id="bookmark_me">
Add to favourites
</button>

JavaScript

$('#bookmark_me').click(function(e){
  e.preventDefault();
  var bookmarkURL = this.href;
  var bookmarkTitle = this.title;
  try {
    if (window.sidebar) { // moz
      window.sidebar.addPanel(bookmarkTitle, bookmarkURL, "");
    } else if (window.external || document.all) { // ie
      window.external.AddFavorite(bookmarkURL, bookmarkTitle);
    } else if (window.opera) { // duh
      $('a#bookmark').attr('href',bookmarkURL);
      $('a#bookmark').attr('title',bookmarkTitle);
      $('a#bookmark').attr('rel','sidebar');
    }
  } catch (err) { // catch all incl webkit
    alert('Sorry. Your browser does not support this bookmark action. Please bookmark this page manually.');
  }
});