bookmark page chrome

Status
Not open for further replies.

supertoon

Active Member
100
2013
2
0
I want to add to my website a script that allows bookmarking the page on click.
I have find a script for the major browser's excepte for chrome, anyone can help?
This is the script i use:
Code:
<script type="text/javascript">
  $(document).ready(function() {
    $("#bookmarkme").click(function() {
      if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(location.href,document.title,"");
      } else if(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;
  }
});
 
5 comments
If that is what you worry about you can always use a script like this:

Code:
function addBookmark(title,url){ 
                        if(window.sidebar){ 
                                window.sidebar.addPanel(title, url, ""); 
                        } else if(document.all){ 
                                window.external.AddFavorite(url, title); 
                        } else if(window.opera && window.print){ 
                                alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok'); 
                        } else if(window.chrome){ 
                                alert('Press ctrl+D to bookmark (Command+D for macs) after you click Ok'); 
                        } 
                }
 
Or tell them to press the star on their address bar.

09K6QdD.png
 
Status
Not open for further replies.
Back
Top