title: Creating Bookmarklet: Append current URL with specific string
body: <p>I am attempting to create a bookmarklet that will change the URL of the page I am currently on, and load a new page with the URL string changed. I have reviewed a number of other threads on bookmarklets, but I haven't found a solution that works for me.</p>
  
  <p>I would like to be able to change a URL that looks like this:</p>
  
  <p><a href="http://mywebsite.com/directory/page.html" rel="noreferrer">http://mywebsite.com/directory/page.html</a>?<strong>referral=Google&amp;visit=1</strong></p>
  
  <p>to:</p>
  
  <p><a href="http://mywebsite.com/directory/page.html" rel="noreferrer">http://mywebsite.com/directory/page.html</a>?<strong>dog=Fido&amp;cat=Mittens</strong></p>
  
  <p>The three goals:</p>
  
  <p>1) Delete anything in the existing URL after the ? mark.</p>
  
  <p>2) Append "dog=Charlie&amp;cat=Mittens" after the question mark.</p>
  
  <p>3) Immediately load this new page, with the new URL</p>
  
  <p>It seems simple enough, but I have not been able to figure out how to do this. Any help would be greatly appreciated!</p>