Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @id Amazon URL Cleaner
- // @name Amazon URL Cleaner
- // @namespace http://efcl.info/
- // @description replaceState for Amazon
- // @include https://www.amazon.com/*
- // @include https://www.amazon.com/dp/*
- // @include https://www.amazon.com/*gp/product/*
- // @include https://www.amazon.com/exec/obidos/ASIN/*
- // @include https://www.amazon.com/o/ASIN/*
- // @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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement