How to make this work in Opera? I found this piece of code for Opera, but it doesn't work for me:
function AddToFavorites(title, url) {
if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(title, url,"");
return false;
}
else if( window.external ) { // IE Favorite
window.external.AddFavorite( url, title);
return false;
}
else if(window.opera && window.print) { // Opera Hotlist
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
return false;
}
}
The Dragonfly error console is silent, no errors are occuring.
If you insist on it, then do it without dynamically generated redundant links:
<a href="http://real.url.example.com" title="Bookmark me, pleaeease!"
rel="sidebar"
onclick="return !addToFav(this.href,this.title)">
but please, just don't do it.
As Opera user I will be grateful for not pushing that fad – I can easily drag'n'drop tab to bookmarks bar/panel/speedial if I choose to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With