Stage-2023/cams/html/script.js
2023-07-19 00:52:08 +02:00

19 lines
478 B
JavaScript

fetch('result.txt')
.then(response => response.text())
.then(data => {
const imageLinks = data.split('\n');
const container = document.getElementById('imageContainer');
imageLinks.forEach(link => {
if (link.trim() !== '') {
const img = document.createElement('img');
img.src = link;
img.style.display = 'block';
container.appendChild(img);
}
});
})
.catch(error => {
console.error('Error:', error);
});