userscript to fetch and display the country of origin for amazon products. initially developed to make boycotting the CCP more easy.
< Feedback on Country of origin for Amazon products
If it shows amazon as the seller it's either sold by amazon or the seller origin data is not made available by amazon.
if you dont think that is the case and it erroneously shows amazon, please provide a product page that can demonstrate that problem.
Thanks for replying.
Here's an example.
Search listing for chocolate shows most items sold by Amazon: https://www.amazon.com/s?k=chocolate
First item I click on, which shows sold by Amazon: https://www.amazon.com/HERSHEYS-Nuggets-Chocolate-Candy-Assortment/dp/B07PFF8J2P/ref=sr_1_5?sr=8-5
But the country of origin listed is USA.
Second item I clicked on, also showing sold by Amazon: https://www.amazon.com/Ferrero-MCLANE500342642-Rocher-Hazelnut-Chocolate/dp/B0002XO5W4/ref=sr_1_6?sr=8-6
But the country of origin listed is Canada.
I'm currently using the chrome extension `Made Where: Country of Origin for Amazon` which correctly shows the country of origin. Maybe you can look into its javascript and see how they do it. I'm not a programmer, and couldn't figure it out by asking ChatGPT to compare its .js to modify your userscript.
I have updated the script to make this additional check. It should work now
Cool stuff. Thanks. The correct flag shows up in the product page.
It's not working for me at the moment. It displays Amazon as the seller instead of the country.
Your script is soooo useful. I hope it gets updated again.