hiya!
so, i finally implemented my own fortune cookie thing and made it compatible with unix fortune!
for those who dont know, unix fortune database files are just plaintext seperated by newlines and a percent sign
theres a ton out there and i wanted to make them compatible with this so i implemented it to be supported!
a fortune file looks like this:
if you make your own quote file make sure to add a newline between them because its hardcoded to remove the last character to cope with the newline
its super easy to implement too! just add this to your html:
<script src="https://abslimeware.neocities.org/assets/js/unixfortune.js"></script>
<marquee onstart="updateFortune(this, 'path/to/fortunefile')"></marquee>
you can also replace the marquee with any element and replace onstart with onload, since it uses the first argument of the function to target which element to edit
edit: for clarification, updateFortune is just a wrapper to update the element pointed to by the first argument, if you want to immplement your own you can use fetchFortune('path/to/fortunefile') to just get the string