Last active
November 14, 2019 09:40
-
-
Save ssig33/7ff113061e9d99e4e584876c6bda776c to your computer and use it in GitHub Desktop.
This file contains hidden or 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== | |
// @id Amazon URL Cleaner | |
// @name Amazon URL Cleaner | |
// @namespace http://efcl.info/ | |
// @description replaceState for Amazon | |
// @include https://www.amazon.co.jp/* | |
// @include https://www.amazon.com/* | |
// @version 0.0.1.20140518104255 | |
// ==/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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment