Replace article URL with short Amazon permalink
当前为
// ==UserScript==
// @name Amazon short URL
// @namespace graphen
// @description Replace article URL with short Amazon permalink
// @include /^https?://www\.amazon\.(cn|in|co\.jp|sg|fr|de|it|nl|es|co\.uk|ca|com(.\(mx|au|br))?/.*/(dp|gp/product|exec/obidos/ASIN|o/ASIN)/.*$/
// @noframes
// @grant none
// @version 1
// ==/UserScript==
(function(doc) {
// ASIN.0 in kindle store
var asin = doc.getElementById("ASIN") || doc.getElementsByName("ASIN.0")[0];
if (asin) {
asin = asin.value;
history.replaceState(null, "Amazon URL Cleaner", "/dp/" + asin + "/");
}
})(document);