Back to Repository

amazon

0 upvotes
By christianlorenzen23@gmail.com
Before page load (document_start)

Match Pattern

https://*/*/dp/*

Script Code

const m = location.href.match(/https:\/\/(www\.amazon\.[a-z.]+)\/.*\/dp\/([A-Z0-9]{10})/);
if (m) {
    location.replace(`https://${m[1]}/dp/${m[2]}`);
}
Install requires the InjectJS Chrome extension. Scripts run only on sites matching the pattern above. Review code before installing any community script.