I wanted to create a bookmarklet that would find the user's URL and title of the page they were on when they clicked the bookmarklet, go to my website's create new link form, and autofill the fields with that information. While researching, I found that nothing I could find fit this description, so I cobbled the code together from a few different sources.
FIRST, create a link to the bookmarklet, which you will tell people to drag to their browser bookmark bar. This will also take in the website and decode it so it shows up as http:// in the form. Make sure you match the name of your fields in your form that you want to be autofilled.
<a href="javascript:(function(){var newURI='YOUR_URL_TO_YOUR_FORM_PAGE?NAME_OF_URL_FIELD='+encodeURIComponent(decodeURIComponent(window.location.href))+'&NAME_OF_TITLE_FIELD='+encodeURIComponent(document.title.replace('%20',' ')); window.location.href=newURI;})();">TEXT THAT THE BOOKMARKLET WILL SAY WHEN YOU DRAG IT TO YOUR BOOKMAR