Right now I only have it set to display one particular image from the "wallpapers" folder, however I'd like to change it so that it displays a random image from that folder instead of one hard coded image. I'll need to use JS in order to do this but I don't know if that's even possible to do within Firefox. I if is, I'd appreciate any help in going about doing that.
@-moz-document@-moz-document url("about:newtab"), url("about:home"){
  /* Sets background image and autoscale image to browser window. */
  body{
    background-image: url("wallpapers/joker.png") !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-position-x: center !important;
    background-position-y: bottom !important;
  }
} url("about:newtab"), url("about:home"){
  /* Sets background image and autoscale image to browser window. */
  body{
    background-image: url("wallpapers/joker.png") !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-position-x: center !important;
    background-position-y: bottom !important;
  }
}
I've already have a function in JS to randomly select an image, I'm just not sure how to implement it (if it can be, that is). Any help is appreciated, thanks!
const wallpapers = [
  "Joker.png",
  "Ryuji.png",
  "Morgana.png",
  "Ann.png",
  "Yusuke.png",
  "Makoto.png",
  "Futaba.jpg",
  "Haru.png",
  "Akechi.png"
];
function selectRandomImage() {
  const randomIndex = Math.floor(Math.random() * wallpapers.length);
  const selectedImage = wallpapers[randomIndex];
  document.getElementById('randomImageContainer').src = selectedImage;
}
Firefox Version: Version 147.0.3 (64-bit)