Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
javascript:var re = new RegExp('(?:dp/)([0-9A-Z]+)'); var match = re.exec(location.href); if (match.length > 1) { var id = match[1]; var url = 'http://amzn.com/' + id; alert(url); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment