The Ultimate Add Bookmark Script
Guide your visitors in adding your page as a bookmark (aka favorite) in their browser with this cross-browser, cross-platform script.
How To Get The Script
You can download the jQuery version of the script here.
(jQuery needs to be loaded into the page before this script.)
Purchase Commercial License
Show Your Appreciation By Donating $5
Non-Commercial users may show their appreciation by making a small $5 donation. Whether you do or not, I hope you find the script useful.
How To Use The Script
The script looks for an element with the ID attribute set to "addBookmarkContainer" and appends a new link (<a>) element as a child of it. The following code is an example of the elements needed to use this script on a page (change the path as needed).
Would you like assistance in installing this script? If so, please contact us.
What Makes This Script Different?
Another big difference is that it is made to do something useful in more browsers than just IE/Win, Firefox, and/or Opera 7+. It is known to work (to varying degrees) in IE5+/Win, Firefox, Safari, Google Chrome (for Windows), Netscape 6+, Opera 7+, Konqueror 3+, IE5/Mac, and iCab 3.
Many similar scripts use
rel="sidebar" to add a bookmark in Firefox. There's just
one problem with those two methods — they add a bookmark that is set to
open in the sidebar (panel) by default instead of opening in the window/tab
like a normal bookmark.
rel="sidebar" works fine in
Opera 7+, because in the dialog window there is an option to make the bookmark
open in the sidebar or not. Firefox doesn't provide that option in the dialog
window; to change it you have to open the properties of the bookmark, which
most people won't be aware of or know how to do.
Known IE Issue
When the page is viewed directly from Windows, there's a security limitation on the function used in IE that triggers an error which causes the page to reload. I could add code to prevent the error, but since the script will always be used on a web server, it doesn't seem worth making the script longer to fix it.
I've added code to detect mobile devices and disable this script in them, since this script is meant for desktop browsers. To support mobile devices I would need to be given information on the support each device does or does not provide for features needed for use in this script.
I made the script be more friendly for keyboard users. I also made a jQuery version of the script to take advantage of a few useful jQuery features.
I updated the script to be more user friendly in Firefox 3.5+.