Skip to content

Instantly share code, notes, and snippets.

@timcheadle
Created October 4, 2012 15:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timcheadle/3834405 to your computer and use it in GitHub Desktop.
Save timcheadle/3834405 to your computer and use it in GitHub Desktop.
Amazon Associate Link Bookmarklet
javascript:(function()%7Bassociate_tag%3D%27fourspace-20%27%3Blink%3D%27http://amazon.com/dp/%27%2Bdocument.getElementById(%27ASIN%27).value%2B%27/%3Ftag%3D%27%2Bassociate_tag%3Bwindow.prompt(%22Copy%20to%20clipboard:%22,link)%3B%7D)()%3B
// Replace with your associate_tag
//
// NOTE: There's no way to automatically copy to clipboard, so we use a prompt() instead
associate_tag = 'fourspace-20';
link = 'http://amazon.com/dp/' + document.getElementById('ASIN').value + '/?tag=' + associate_tag;
window.prompt ("Copy to clipboard:", link);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment