chrismbryant / amazon-confidence-interval

A browser extension which adds Bayesian visualizations to Amazon ratings.
MIT License
31 stars 4 forks source link

Extract ratings from the products search page #7

Closed aeciorc closed 4 years ago

aeciorc commented 4 years ago

Hey @chrismbryant, I found this repo on the comments of that 3blue1brown video. This PR adds the following functionality: 1) manifest.json is modified so that the extension only has permission to run on the amazon search page. I manually added permissions for the american and canadian stores, as the url pattern matching doesn't let us use a pattern like "amazon.*" 2) background.js listens to change on the tab url to set the extension icon (active or inactive, I added a placeholder one for now) and runs the script inject.js when the amazon search page is loaded. 3) For each product in the results, inject.js extracts the ratings and number of reviews from the DOM and inserts the confidence interval (placeholder for now, I left a //TODO there so that you can complete it)