3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV · data · 3sxpetQLi3y1c6QTtdiCy7a9g7v9vDGSg6RAbzqfHFrk_2wduMRwpRUVFhbWGmMkC11VfLnyNAgJ7PqiKEynm6scX_description_chatgpt
{
"3sxpetQLi3y1c6QTtdiCy7a9g7v9vDGSg6RAbzqfHFrk_2wduMRwpRUVFhbWGmMkC11VfLnyNAgJ7PqiKEynm6scX_description_chatgpt": "can you revise this html page for me? the javascript seems to be malfunctioning, since it does not print the cookie status. <!DOCTYPE html> <html lang="it-IT"> <body> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> <div id="google_translate_element"></div> <h1>ecco una frase in italiano da tradurre</h1> <h2><a href="www.google.it">ecco il link</a></h2> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'it'}, 'google_translate_element'); } function showCookieValue() { const cookieValue = getCookie("googtrans", "translate.google.com"); if (cookieValue) { // Il cookie è presente document.getElementById('googtrans-value').innerHTML = cookieValue; } else { // Il cookie non è presente document.getElementById('googtrans-value').innerHTML = "Il cookie non è presente"; } } </script> <script type="text/javascript"> googleTranslateElementInit(); showCookieValue(); </script> <p id="googtrans-value"></p> </body> </html>"
}
Changelog:
{
"2024.01.13 17:45": "can you revise this html page for me? the javascript seems to be malfunctioning, since it does not print the cookie status. <!DOCTYPE html> <html lang="it-IT"> <body> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> <div id="google_translate_element"></div> <h1>ecco una frase in italiano da tradurre</h1> <h2><a href="www.google.it">ecco il link</a></h2> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'it'}, 'google_translate_element'); } function showCookieValue() { const cookieValue = getCookie("googtrans", "translate.google.com"); if (cookieValue) { // Il cookie è presente document.getElementById('googtrans-value').innerHTML = cookieValue; } else { // Il cookie non è presente document.getElementById('googtrans-value').innerHTML = "Il cookie non è presente"; } } </script> <script type="text/javascript"> googleTranslateElementInit(); showCookieValue(); </script> <p id="googtrans-value"></p> </body> </html>"
}