async initialize() {
    let newImages = await DatabaseInfoModule.retrieveInfo(database, "Custom preferences", {query: "backgroundImages"});
    // console.log(newImages);
    this.animations = (await DatabaseInfoModule.retrieveInfo(database, "Custom preferences", {query: "animations"}))[0];
    
    if (this.animations === undefined) {
      this.animations = true;
      DatabaseInfoModule.saveInfo(database, "Custom preferences", {key: "animations", value: this.animations});
    }
    if (newImages.length === 0 || !newImages[0]) {
      console.log("No images whatsoever!");
      return;
    }

    this.setImagesAsBackground(newImages[0]);
    DOMElementHandler.renderSwitch("switch_animation_div", ".inside-switch-div",
      {
        leftValue: false,
        rightValue: true,
      },
      this.animations
    );
  }
/**
   * Initializes the functionality by retrieving all background images and animation state from the database and renders them
   * @async
   */
Initializes the functionality by retrieving all background images and animation state from the database and renders them
@async
Initializes the functionality by retrieving all background images and animation state from the database and renders them @async
async initialize() {
    let newImages = await DatabaseInfoModule.retrieveInfo(database, "Custom preferences", {query: "backgroundImages"});
    this.animations = (await DatabaseInfoModule.retrieveInfo(database, "Custom preferences", {query: "animations"}))[0];
    if (this.animations === undefined) {
      this.animations = true;
      DatabaseInfoModule.saveInfo(database, "Custom preferences", {key: "animations", value: this.animations});
    }
    if (newImages.length === 0 || !newImages[0]) {
      console.log("No images whatsoever!");
      return;
    }
    this.setImagesAsBackground(newImages[0]);
    DOMElementHandler.renderSwitch("switch_animation_div", ".inside-switch-div",
      {
        leftValue: false,
        rightValue: true,
      },
      this.animations
    );
  }
async initialize ( ) { let newImages = await DatabaseInfoModule . retrieveInfo ( database , "Custom preferences" , { query : "backgroundImages" } ) ; this . animations = ( await DatabaseInfoModule . retrieveInfo ( database , "Custom preferences" , { query : "animations" } ) ) [ 0 ] ; if ( this . animations === undefined ) { this . animations = true ; DatabaseInfoModule . saveInfo ( database , "Custom preferences" , { key : "animations" , value : this . animations } ) ; } if ( newImages . length === 0 || ! newImages [ 0 ] ) { console . log ( "No images whatsoever!" ) ; return ; } this . setImagesAsBackground ( newImages [ 0 ] ) ; DOMElementHandler . renderSwitch ( "switch_animation_div" , ".inside-switch-div" , { leftValue : false , rightValue : true , } , this . animations ) ; }
Initializes the functionality by retrieving all background images and animation state from the database and renders them
 @async
Initializes the functionality by retrieving all background images and animation state from the database and renders them @async
// console.log(newImages);