General URL Cleaner

Cleans URL's from various popular sites.

< Feedback on General URL Cleaner

Review: OK - script works, but has bugs

§
Posted: 2020-01-09
Edited: 2020-01-09

Does not work as expected(Amazon)

When I search "PLT-M70" on www.amazon.co.jp, some links are all "/dp/PLANTRONIC". e.g.

 function cleanAmazonItemdp(a) {
-    let item = a.pathname.match(/\/[A-Z0-9]{10}/);
+    let item = a.pathname.match(/\/dp(\/[A-Z0-9]{10})/)[1];
     return a.origin + '/dp' + item + a.hash;
 }

Post reply

Sign in to post a reply.