Goodbye Amazon Badge

I have been neglecting this site’s coding for too long. I was shocked this morning to find a ton of gibberish in the edit css window in Firefox/Web Dev Toolbar. I was able to track it down to a huge mangled mess of JavaScript coming from an Amazon.com badge. I first installed the badge while reviewing a book.
Here’s a brief snippet of the junk code:

<script src="function%20%28iterator%29%20%7B%0A%20%20%...
20%7D%0A%20%20%20%20%7D%0A%7D"
type="text/javascript"></script>

<script src="function%20%28iterator%29%20%7B%0A%20%20%...
%7D%7D%29;%0A%20%20%20%20return%20result;%0A%7D"
type="text/javascript"></script>

<script src="function%20%28iterator%29%20%7B%0A%20%...
%0A%20%20%20%20return%20result;%0A%7D"
type="text/javascript"></script>

<script src="function%20%28iterator%29%20%7B%0A%20%20%...
29;%7D%29;%0A%20%20%20%20return%20results;%0A%7D"
type="text/javascript"></script>

<script src="function%20%28iterator%29%20%7B...
%20%20%20%20return%20result;%0A%7D"
type="text/javascript"></script>

<script src="function%20%28iterator%29%20%7B%...
%0A%20%20%20%20return%20results;%0A%7D"
type="text/javascript"></script>

It’s pretty ugly stuff. This is only about 10% of the code inserted into the pages. Hopefully it’s just a small bug on the Amazon badge service that is sending the encoded scripts. Regardless, it’s pretty nasty to import over 40 script tags with a complete library of Amazon js files. Check your site’s generated code if you are using Amazon’s associate program. You too may have this junk.

Published by Ted

Accessibility is more than making sure images have alternate text. I work with engineers, product managers, and designers to understand how accessibility impacts the users, set realistic deadlines, and create the solutions to provide a delightful experience to all users, regardless of their physical, sensory, or cognitive ability.

Leave a comment

Your email address will not be published. Required fields are marked *