/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function addBookmark() { var success=false; // try each until fail try { window.external.AddFavorite(window.location, document.title); success=true; } catch(e) {} try { window.sidebar.addPanel(document.title,location.href,''); success=true; } catch(e) {} if(!success) { alert("Your browser does not support auto bookmarking. Press CTRL+D, or CMD+D to manually bookmark this page."); } }