Return to Snippet

Revision: 34243
at October 19, 2010 21:01 by JamesFillingham


Updated Code
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.");
    }
}

Revision: 34242
at October 19, 2010 20:58 by JamesFillingham


Initial Code
function addBookmark()
{
    var success=false;

    // try each until all 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("AUTO BOOKMKARING not supported
In your current browser.

Press CTRL+D, or CMD+D
to manually bookmark this page.");
    }
}

Initial URL


Initial Description


Initial Title
Javascript Bookmark

Initial Tags


Initial Language
JavaScript