diff --git a/guestbook/fetch.js b/guestbook/fetch.js index 8b9da70..d23bdc9 100644 --- a/guestbook/fetch.js +++ b/guestbook/fetch.js @@ -12,7 +12,7 @@ fetch('https://api.allorigins.win/raw?url=https%3A%2F%2Fusers2.smartgb.com%2Fg%2 let email = entry.querySelector('tr:nth-child(3) td:nth-child(2) a') ? entry.querySelector('tr:nth-child(3) td:nth-child(2) a').textContent.trim() : 'No email'; let web = entry.querySelector('tr:nth-child(4) td:nth-child(2) a') ? entry.querySelector('tr:nth-child(4) td:nth-child(2) a').textContent.trim() : 'No website'; let number = entry.querySelector('tr:nth-child(5) td:nth-child(2)') ? entry.querySelector('tr:nth-child(5) td:nth-child(2)').textContent.trim() : 'No number'; - let message = entry.querySelector('.divmess') ? entry.querySelector('.divmess').textContent.trim() : 'No message'; + let message = entry.querySelector('.divmess') ? entry.querySelector('.divmess').innerHTML.trim() : 'No message'; let guestbookEntry = document.createElement('div'); guestbookEntry.classList.add('guestbook-entry'); @@ -32,4 +32,4 @@ fetch('https://api.allorigins.win/raw?url=https%3A%2F%2Fusers2.smartgb.com%2Fg%2 }) .catch(error => { document.getElementById('guestbook-container').innerHTML = `Error fetching the guestbook: ${error}`; - }); \ No newline at end of file + });