viewing paste bookmark | Javascript

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$('.btn-bookmark').on('click',function()
{
    if(window.sidebar){ //FireFox
        window.sidebar.addPanel(document.title,location.href,"")
    }
    else if(window.external){ //Internet Explorer
        window.external.AddFavorite(location.href,document.title)
    }
    else if(window.opera){ //Opera
        $(this).attr('href',location.href);$(this).attr('title',document.title)
    }
    else{
        alert("Use CTRL+D or CMD+D.")
    }
});
Viewed 1593 times, submitted by Streusel.