Etsy bookmark/snippet to show the hidden product prices from already-sold items
Want to know what an older Etsy product sold for, but Etsy won't display the data on the old product page? Copy and paste this snippet as a new bookmark in your web browser bar, and then click it when you're looking at a product page:
javascript:(function()%7Bvar%20jsonld=JSON.parse(document.querySelector('script[type="application/ld+json"]').innerText);var%20itemName=jsonld.name;var%20itemNameDecoded=itemName.replace(/&/g,'&');itemNameDecoded=itemNameDecoded.replace(/"/g,'"');var%20itemPriceLow=jsonld.offers.lowPrice;var%20itemPriceHigh=jsonld.offers.highPrice;if%20(itemPriceLow===itemPriceHigh)%20{var%20itemPrice=itemPriceLow}else{var%20itemPrice='from%20'+itemPriceLow+'%20to%20'+itemPriceHigh;};var%20itemTags=document.querySelectorAll('h4.tag-with-image-text-internal');var%20itemTagsCount=document.querySelectorAll('h4.tag-with-image-text-internal').length;var%20itemTagsAsArray=[];for%20(var%20i=0;i<itemTagsCount;%20i++)%7BitemTagsAsArray.push(itemTags[i].textContent.replace(/\s+/g,"%20").trim())%7D;var%20msg="Item%20Name:"+"\r\n"+itemNameDecoded+"\r\n"+"\r\n"+"Item%20Price:"+"\r\n"+itemPrice+"\r\n"+"\r\n"+"Item%20Tags:"+"\r\n"+itemTagsAsArray;alert(msg);%7D)();
EDITED TO ADD: If you're in Safari, go to the "Bookmarks" dropdown menu at the top and choose "Add Bookmark". Make the title of the new bookmark whatever you want it to show you, like "Get Etsy sale price" or something, and make the description of the bookmark the long line of javascript code that you copied and pasted. Save the new bookmark, ideally to your main/favorites bookmark bar, so it's easily visible to you just below the URL bar. Ta-da!