Skip to content
WJunction - Webmaster Forum

bookmark page chrome

Status
Not open for further replies.

supertoon

Established Member
100
2013
2
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

great, i dont see any harm that could come from that. there's a lot of people who dont know how bookmark a page
Thanks anyway
 
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.

About the author

S
Established Member · Joined
100
Messages
2
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom