REQUEST A ROBOT
`; const blob = new Blob([html], {type:'text/html'}); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = r.name.replace(/[^a-z0-9]+/gi,'-').replace(/^-|-$/g,'') + '-datasheet.html'; document.body.appendChild(a); a.click(); a.remove(); setTimeout(() => URL.revokeObjectURL(url), 1000); } document.addEventListener('keydown', e => { if(e.key === 'Escape') closeProductPage(); }); document.addEventListener('click', e => { const modal = document.getElementById('product-modal'); if(e.target === modal) closeProductPage(); });