Skip to content

Instantly share code, notes, and snippets.

@voodooGQ
Created July 6, 2012 17:34
Show Gist options
  • Save voodooGQ/3061517 to your computer and use it in GitHub Desktop.
Save voodooGQ/3061517 to your computer and use it in GitHub Desktop.
Javascript: Bookmark Page
<script language="javascript" type="text/javascript">
var urlAddress = window.location.pathname;
var pageName = "A-Affordable Bail Bonds, Inc.";
function addToFavorites() {
if (window.external) {
window.external.AddFavorite(urlAddress,pageName)
}
else { alert("Sorry! Your browser doesn't support this function."); }
}
</script>
<!-- This is the link that will run the script -->
<a href="javascript:addToFavorites()">Bookmark Page !</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment