Short Amazon Permalinks

By Jim Biancolo Last update Feb 20, 2006 — Installed 761 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 5 posts, 5 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Some Girl User

Looks like Amazon changed the markup again. Assuming one already changed "//b[@class='sans']" to "//*[@class='asinTitle']", now changing it to "//*[@id='btAsinTitle']" gets it working again.

By the way, if you're in there editing and you're a member of Amazon's affiliate program, you could also modify it to add your affiliate ID, like so:

origTitle.innerHTML = '<a href="http://amazon.com/o/ASIN/' + asin + '?tag=YOUR-ID-HERE">' + origTitleHTML + '</a>';

Of course, you don't get revenue for your own purchases, but assuming you're pasting the link to give to other people, could be handy.

 
Netjeff Scriptwright

Looks broken due to changes in Amazon's markup. Changing "//b[@class='sans']" to "//*[@class='asinTitle']" fixes it.

 
Juhani Scriptwright

Nice script :)

I changed the rewritten url from http://amazon.com/o/ASIN/ to http://' + document.domain + '/o/ASIN/', so it works on all amazon pages.

 
Yokhannan 1 Scriptwright

Works as advertized. Thanks!

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel