rocksdanister / rain

Rainy window wallpaper
https://rocksdanister.com/rain
Other
50 stars 23 forks source link

Supported files with uppercase filetypes won't load #26

Closed 987computer closed 9 months ago

987computer commented 9 months ago

For example:

picture.jpg < This file can load normally picture.JPG < This one refuses to load because the js code (linked below) is not configured to load the uppercase filetype

I also tested it with a png file and the same behavior happened, leading me to believe that it only loads what the code is instructed to use.

https://github.com/rocksdanister/rain/blob/b4bd5be1ea5da0784f9740e850194ea74dd5e1b0/js/script.js#L127C31-L127C31

Original code (script.js) for reference:

if (ext == "jpg" || ext == "jpeg" || ext == "png")

After local modification:

if (ext == "jpg" || ext == "JPG" || ext == "jpeg" || ext == "JPEG" || ext == "png" || ext == "PNG")

After reloading the theme in Lively with the changes in the code, the uppercase filetypes were able to load. I also presume the same issue would theoretically also apply to webm.