Created
February 6, 2023 07:22
-
-
Save tauseedzaman/2ce1b14c6dbe3f41f08e3b2bfd625985 to your computer and use it in GitHub Desktop.
the-eye
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function readTextFile(file) { | |
var rawFile = new XMLHttpRequest(); | |
rawFile.open("GET", file, false); | |
rawFile.onreadystatechange = function() { | |
if (rawFile.readyState === 4) { | |
if (rawFile.status === 200 || rawFile.status == 0) { | |
var allText = rawFile.responseText; | |
displayImages(allText); | |
} | |
} | |
}; | |
rawFile.send(null); | |
} | |
function displayImages(filenames) { | |
var imageContainer = document.getElementById("imageContainer"); | |
var filenamesArray = filenames.split("\n"); | |
for (var i = 0; i < 500; i++) { | |
var filename = filenamesArray[i]; | |
if (filename) { | |
var image = document.createElement("img"); | |
image.src = filename; | |
image.style.width = "100px"; | |
image.style.height = "100px"; | |
image.style.display = "inline-block"; | |
imageContainer.appendChild(image); | |
} | |
} | |
} | |
</script> | |
</head> | |
<body onload="readTextFile('https://the-eye.eu/public/social/twitter/ukraine/images/urls/0004_images.txt')"> | |
<div id="imageContainer"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment