※うまく動かないストアもあるかと思います。あらかじめご了承ください。
javascript:(()=>{ const getCartInfo=async(e=[])=>{try{let t=await fetch("/cart.js",{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("Network response was not ok");let r=await t.json(),n={};for(let _ of e)_ in r?n[_]=r[_]:n[_]=`"${_}"というプロパティはありません`;return n}catch($){console.error("Error:",$)}},fetchCartInfo=async()=>{let e=["note","attributes"],t=document.getElementById("property-check-results");t.innerHTML="",getCartInfo(e).then(r=>{for(let n of(console.log("結果:",r),e)){let _=document.createElement("tr"),$=document.createElement("td"),o=document.createElement("td");if("note"===n)$.innerText=n,o.innerText=r[n];else if("attributes"===n){$.innerText=n;let a="";for(let i in r[n])a+=`${i}: ${r[n][i]}\n`;o.innerText=a}_.appendChild($),_.appendChild(o),t.appendChild(_)}})},UIManager=(()=>{let e=document.getElementById('property-check-container'),t=()=>{if(e)return;e=document.createElement("div");let t=document.createElement("table");document.createElement("a");let n=document.createElementNS("<http://www.w3.org/2000/svg","svg");n.id="container-closer",n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("viewBox","0> 0 24 24"),n.setAttribute("x","0px"),n.setAttribute("y","0px");let _=document.createElementNS("<http://www.w3.org/2000/svg","path");_.setAttribute("d","M12,2C6.47,2,2,6.47,2,12c0,5.53,4.47,10,10,10s10-4.47,10-10C22,6.47,17.53,2,12,2z> M16.707,15.293 c0.391,0.391,0.391,1.023,0,1.414C16.512,16.902,16.256,17,16,17s-0.512-0.098-0.707-0.293L12,13.414l-3.293,3.293 C8.512,16.902,8.256,17,8,17s-0.512-0.098-0.707-0.293c-0.391-0.391-0.391-1.023,0-1.414L10.586,12L7.293,8.707 c-0.391-0.391-0.391-1.023,0-1.414s1.023-0.391,1.414,0L12,10.586l3.293-3.293c0.391-0.391,1.023-0.391,1.414,0 s0.391,1.023,0,1.414L13.414,12L16.707,15.293z"),n.appendChild(_),n.appendChild(_),e.id="property-check-container",t.id="property-check-results",n.onclick=r,e.appendChild(n),e.appendChild(t);let $=`#property-check-container { position: fixed; max-width: 400px; right: 20px; bottom: 20px; z-index: 1000; background: #FFF; padding: 20px; border: 1px solid #CCC; } #property-check-container table { border: 1px solid #CCC; } #property-check-container table td { border: 1px solid #CCC; border-collapse: collapse; font-size: 16px; padding: 1rem; } #container-closer { text-decoration: none; color: #000; position: absolute; right: 2px; top: 2px; } `,o=document.createElement("style");o.type="text/css",o.appendChild(document.createTextNode($)),document.head.appendChild(o),document.body.appendChild(e),fetchCartInfo()},r=()=>{e&&(e.remove(),e=null)};return{generate:t,remove:r}})();UIManager.generate();})();

