Created
May 25, 2010 20:39
-
-
Save nathos/413662 to your computer and use it in GitHub Desktop.
AmznShortener - Javascript bookmarket source for an Amazon.com short-link generator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var aff = 'nathos-20'; // replace 'nathos-20' with your Amazon affiliate ID, including the '-20' | |
if (!document.getElementById('ASIN')) { | |
alert('Can\'t find an Amazon product ID'); | |
return; | |
} | |
var asin = document.getElementById('ASIN').value; | |
prompt( | |
'Here is the shortened affiliate link:', | |
'http://amzn.com/' + asin + '?tag=' + aff); | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
if (!document.getElementById('ASIN')) { | |
alert('Can\'t find an Amazon product ID'); | |
return; | |
} | |
var asin = document.getElementById('ASIN').value; | |
prompt( | |
'Here is the shortened affiliate link:', | |
'http://amzn.com/' + asin); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nathan, feel free to use this fork. I've added support for Kindle ebooks.