Confused Shopper is a Chrome extension that changes all of the prices on your page to appear to be between $0.01 and $0.99. Secretly upload it to a friend's computer and enjoy their reaction when they discover the great new deals of the day.
Lessons Learned:
- Calling the Javascript String replace() method with a function
- Regular Expressions for a repeating patterns
- Basic setup of a Chrome extension
Issues:
- Something like '$5 billion' would turn into something like '$0.45 billion', which looks silly.
- Since prices are randomly generated, if a page displays the price of a single item twice the two values may be different.
Fixes/additional features to add:
- Include conditions for the words 'billion, million, hundred' etc. and change accordingly.
- Keep equal prices equal (i.e. $10 and $10 will equal $0.22 and $0.22).
- Let users choose the range of prices they want to display.
- Add functionality for turning the extension off
- Including a safeguard to keep people from actually buying anything when they are under the assumption that it costs less.