Add files via upload

This commit is contained in:
ShadowLibraries 2023-08-22 21:47:05 -03:00 committed by GitHub
parent c4cf3e02aa
commit 960f9988b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 1507 additions and 2 deletions

19
js/randomimg.js Normal file
View file

@ -0,0 +1,19 @@
// Get a list of all the files in the folder
const fileNames = [
'img/pirate-logo-color.png',
'img/pirate-logo-color-new.png',
'img/missingno.png',
'img/floppysl.png',
];
// Get a random index from the list of file names
const randomIndex = Math.floor(Math.random() * fileNames.length);
// Get the file name at the random index
const randomFileName = fileNames[randomIndex];
// Get the image element
const imageElement = document.getElementById('random-image');
// Set the src attribute of the image element to the random file name
imageElement.src = randomFileName;