Jdhaimson / smilealways

Chrome Extension to redirect www.amazon.com to smile.amazon.com
www.smilealways.io
GNU General Public License v2.0
145 stars 32 forks source link

Breaks with some affiliate links ( https://smile.amazon.com/?sa-no-redirect=1 ) #51

Open SamuelWN opened 3 years ago

SamuelWN commented 3 years ago

When attempting to follow links from the The WireCutter, the extension causes the page to redirect to https://smile.amazon.com/?sa-no-redirect=1 .

I initially thought it might have something to do with the redirect chain that Wirecutter uses. However, parsing through the DevTools network log revealed it to be an issue with the final Amazon URL instead.

Example: Loading up a new window and attempting to navigate to: https://www.amazon.com/dp/B0845NXCXF/?tag=thewire06-20&linkCode=xm2&ascsubtag=AwEAAAAAAAAAAepL

will cause the user to be redirected to https://smile.amazon.com/?sa-no-redirect=1. This does not occur when the smilealways extension is disabled.

SamuelWN commented 3 years ago

Failed to check that the issue occurs even while adjusting the URL manually, and it does. i.e. https://smile.amazon.com/dp/B0845NXCXF/?tag=thewire06-20&linkCode=xm2&ascsubtag=AwEAAAAAAAAAAepL redirects to: https://smile.amazon.com/

Trial & error points to the problematic parameter being the affiliate ID (tag=thewire06-20). If the extension could be tweaked handle such instances, that'd be great.

Giving the user the option to select whether it handles it by removing the affiliate ID or simply not forward to smile.amazon would be the optimal solution.