I've seen this question already multiple times: How to add a bookmark this page button. But it seems no solution is working currently.
The code im trying to use at the moment:
$('.js-bookmarkme').click(function(e) {
e.preventDefault();
if (window.sidebar && window.sidebar.addPanel) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(document.title,window.location.href,'');
} else if(window.external && ('AddFavorite' in window.external)) { // IE Favorite
window.external.AddFavorite(location.href,document.title);
} else if(window.opera && window.print) { // Opera Hotlist
this.title=document.title;
return true;
} else { // webkit - safari/chrome
alert('Press ' + (navigator.userAgent.toLowerCase().indexOf('mac') != - 1 ? 'Command/Cmd' : 'CTRL') + ' + D to bookmark this page.');
}
});
Source: How do I add an “Add to Favorites” button or link on my website?
As stated in the comments:
Firefox's propriety window.sidebar.addPanel(..) has been deprecated, and the function was removed in Firefox 23 (see third bullet)
– Will Hawker
Supposedly the FF solution to date isn't working anymore, but the Opera solution isn't working either. (Though I wasn't able to test the IE solution yet).
That brings in the obvious question: How can you achive a Bookmarklet button? With browser support as far as possible.