tetsudai / Lively

The official code repository for the Lively Discord website – a custom website built from the ground up using modern web technologies like HTML5, CSS3 and Bootstrap 4. Learn more in README.md
https://livelydiscord.netlify.com
GNU General Public License v3.0
1 stars 1 forks source link

backgr() function is entirely formed of if else statements #11

Open aidswidjaja opened 4 years ago

aidswidjaja commented 4 years ago

Maybe, this can be fixed in the future... but the backgr() function is entirely formed of if else statements.

function backgr(){
    var randimg = Math.floor(Math.random()*3);
    if (randimg==0){
    document.getElementById('bod').className="bg1 bg";
    }
    else if (randimg==1){
    document.getElementById('bod').className="bg2 bg";
    }
    else if (randimg==2){
    document.getElementById('bod').className="bg3 bg";
    }
  }

Lol