Last active
March 14, 2017 01:56
-
-
Save gowon/56c1e1e0ef2710c6fde04d93c612cee1 to your computer and use it in GitHub Desktop.
Amazon Affiliate Bookmarklet
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
javascript: (function(affiliateId) { | |
var match = document.location.href.match("/([a-zA-Z0-9]{10})(?:[/?]|$)"); | |
if (!match) { | |
alert("Can't find the product ID."); | |
return; | |
} | |
prompt("Affiliate Link:", "http://amzn.com/" + match[1]+ "?tag=" + affiliateId); | |
})("goodornah-20") |
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
javascript:(function(t){var o=document.location.href.match("/([a-zA-Z0-9]{10})(?:[/?]|$)");return o?void prompt("Affiliate Link:","http://amzn.com/"+o[1]+"?tag="+t):void alert("Can't find the product ID.")}("goodornah-20")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment