Created
May 12, 2009 07:03
-
-
Save kurumigi/110360 to your computer and use it in GitHub Desktop.
[GM script]Amazon Short URL Maker
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
// ==UserScript== | |
// @name Amazon Short URL Maker | |
// @namespace http://d.hatena.ne.jp/kurumigi/ | |
// @include http://www.amazon.tld/* | |
// @include http://amazon.tld/* | |
// ==/UserScript== | |
(function() { | |
if (document.getElementsByName('ASIN').length) { | |
var shortURL = 'http://'+document.domain+'/dp/'+document.getElementsByName('ASIN')[0].value+'/'; | |
document.getElementById('btAsinTitle').innerHTML = '<a href="'+shortURL+'">'+document.getElementById('btAsinTitle').innerHTML+'</a>' | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment