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

No longer working? #1

Closed umbrae closed 10 years ago

umbrae commented 10 years ago

Looks like there are a few reports of this no longer working in chrome reviews:

https://chrome.google.com/webstore/detail/smile-always/jgpmhnmjbhgkhpbgelalfpplebgfjmbf/reviews?hl=en

I can confirm that on a first install. When I view an amazon URL without the smile subdomain, nothing changes.

Jdhaimson commented 10 years ago

Can you let me know which version of the extension you have installed? There was a bug in version .8, but it should have been fixed in version .81.

Thanks, Josh

On Mon, Feb 17, 2014 at 8:37 PM, Chris Dary notifications@github.comwrote:

Looks like there are a few reports of this no longer working in chrome reviews:

https://chrome.google.com/webstore/detail/smile-always/jgpmhnmjbhgkhpbgelalfpplebgfjmbf/reviews?hl=en

I can confirm that on a first install. When I view an amazon URL without the smile subdomain, nothing changes.

Reply to this email directly or view it on GitHubhttps://github.com/Jdhaimson/smilealways/issues/1 .

Josh Haimson Massachusetts Institute of Technology 2016 Departments of Computer Science and Biology josh-haimson.com | jhaimson@mit.edu JHaimson@mit.edu | 516.640.6221

umbrae commented 10 years ago

I'm on 0.81. I noticed in the console I'm seeing this:

Uncaught SecurityError: Blocked a frame with origin "http://smile.amazon.com" from accessing a frame with origin "http://www.amazon.com". Protocols, domains, and ports must match. iframeproxy-34.html:3
Uncaught SecurityError: Blocked a frame with origin "http://smile.amazon.com" from accessing a frame with origin "http://www.amazon.com". Protocols, domains, and ports must match. iframeproxy-34.html:2
Failed to load resource: the server responded with a status of 404 (Not Found) https://smile.amazon.com/empty.gif?1392737929984

But the browser stays in the same spot. I'm looking at this URL: http://www.amazon.com/The-Rise-Fall-Third-Chimpanzee/dp/0099913801

jchubber commented 10 years ago

@umbrae That link won't work because it includes "/dp/". All "/dp/" links are excluded from redirection (line 23 of request.js).

So here's a question for @Jdhaimson Why are you excluding /dp/ links from redirection? It appears that almost all amazon links found through google, for example, are /dp/ links. Furthermore, redirecting them seems to successfully return a valid product page. http://www.amazon.com/The-Rise-Fall-Third-Chimpanzee/dp/0099913801 and http://smile.amazon.com/The-Rise-Fall-Third-Chimpanzee/dp/0099913801 are both kosher. If the /dp/ and /gp/ exceptions are unnecessary, I'd be happy to submit a PR that reverts them...

jchubber commented 10 years ago

@Jdhaimson You can close this issue as well. Fixed when you merged in #3