Created
May 25, 2010 20:39
Revisions
-
nathos revised this gist
May 25, 2010 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ (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); })() -
nathos created this gist
May 25, 2010 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ (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); })()