- "content": "<html><body><style> #aiform button {background: #8338ff; border-radius: 4px; box-shadow: 0 4px 16px rgb(131 56 255 / 25%), 0 0 12px rgb(131 56 255 / 4%), 0 2px 2px rgb(131 56 255 / 5%); color: #fff; font-size: 1.6rem; font-weight: 600; line-height: 2.4rem; margin-top: 1.5rem; padding: 1rem 4.6rem;} #aiform input {padding: 0.5rem; margin: 0.5rem 0.7rem; border: 1px solid #aaa; width: 300px;} #aiform .required {color: red;} </style><h1>JSight AI</h1><div id='jsightai-form'><p><b>Our smart JSight AI can automatically improve your “GYM REST API” API design.</b><br />Please fill the form below and press the “Improve API” button. JSight AI will send the improved API version to your email.</p><div><form id='aiform'><label for='aiform-name'>Name <span class='required'>*</span></label><input type='text' id='aiform-name'/><br/><label for='aiform-email'>Email <span class='required'>*</span></label><input type='text' id='aiform-email'/><br/><button onclick=\"const name = document.getElementById('aiform-name').value; const email = document.getElementById('aiform-email').value; if(name == '') { alert('Fill your name!'); return false; } if(email == '') { alert('Fill your email!'); return false; } const data = { name: name, email: email }; fetch('https://jsightforms-ce0e.restdb.io/rest/aiform', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-apikey': '63f3ae20478852088da684cf', }, body: JSON.stringify(data), }) .then((response) => response.json()) .then((data) => { console.log('Success:', data); }) .catch((error) => { console.error('Error:', error); return false; }); document.getElementById('jsightai-form').innerHTML = '<p>Your API improvement request has been submitted. JSight AI will send you the response soon.</p>'; return false;\">Improve API</button></form></div></div></body></html>"
0 commit comments