--------------------------------- <body> <div id="previewCardImages"></div> <script> function extractPreviewCardLinks(responseText) { const pattern = /\/cache\/preview_cards\/images\/\d{3}\/\d{3}\/\d{3}\/original\/[a-f0-9]+\.(?:jpg|jpeg|png|gif)/gi; const matches = responseText.match(pattern); return matches || []; } function generateImageTags(imageUrls, domain) { let html = ''; imageUrls.forEach(imageUrl => { html += '<img src="' + domain + imageUrl + '" alt="Preview Card Image"><br>'; }); return html; } const url = 'https://mastodon.social/api/v1/accounts/109977878421486714/statuses'; fetch(url) .then(response => response.text()) .then(responseText => { const previewCards = extractPreviewCardLinks(responseText); const domain = 'https://files.mastodon.social'; const html = generateImageTags(previewCards, domain); document.getElementById('previewCardImages').innerHTML = html; }) .catch(error => { console.error('Error: Unable to fetch data.', error); }); </script> </plaintext>