Advertisement
Guest User

Untitled

a guest
Feb 8th, 2017
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. // ==UserScript==
  2. // @id Amazon URL Cleaner
  3. // @name Amazon URL Cleaner
  4. // @namespace http://efcl.info/
  5. // @description replaceState for Amazon
  6. // @include https://www.amazon.com/*
  7. // @include https://www.amazon.com/dp/*
  8. // @include https://www.amazon.com/*gp/product/*
  9. // @include https://www.amazon.com/exec/obidos/ASIN/*
  10. // @include https://www.amazon.com/o/ASIN/*
  11. // @version 0.0.1.20140518104255
  12. // ==/UserScript==
  13. (function(doc) {
  14. // ASIN.0 in kindle store
  15. var asin = doc.getElementById("ASIN") || doc.getElementsByName("ASIN.0")[0];
  16. if (asin) {
  17. asin = asin.value;
  18. history.replaceState(null, "Amazon URL Cleaner", "/dp/" + asin + "/");
  19. }
  20. })(document);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement