cabl

a cat girl

kinda a girl that posts and stuff its knida cool
+18 but not nsfw | 21


Personal site (has links there)
cabl.rodeo/
sheezy.art
sheezy.art/cabl
mastodon (yiff.life)
yiff.life/@cabl

is it possible to get the list of files in a directory using javascrypt?
Im trying to make a gallery type thing for my website that will
read the files in a directory and then add those files to the thing

This is for my neocities page, idk if that means anything but yeah

edit:
FIGURED OUT HOW TO DO IT GAMERS
LINK
(im going to need to go back and redo the css on this eventually but it works!)
(also put newer art on there lol)


You must log in to comment.

in reply to @cabl's post:

gonna second what @pantograph said. I think the most straightforward way to do this using vanilla javascript would be to put the file names into an array and then:

loop through them to display all the images (https://www.geeksforgeeks.org/how-to-display-images-from-an-array-in-javascript/)

or

display a random set of images by generating some numbers and adding those to the html src attribute (https://www.geeksforgeeks.org/random-image-generator-using-javascript/#)

naming all your files numerically would make this easier. if you wanna display the image titles too you could make a map and use that (https://www.w3schools.com/js/js_maps.asp)

idk how much you've worked with JS already, so if this is stuff you know my apologies 😅 hope this helps!