<commit_before>var teams = {};
var matches = {};

var uploadStack;

var showID = "ID0";

$(document).ready(function(){
    //showID = "ID0";
    //show(showID);

    //document.getElementsByClassName('addTeam')[0].style.display = "block";
    //document.getElementById("ID0").style.display = "block";

    //teams = {};
    //matches = {};

    $(document).resize(function(){
    
    });
});

function show(id){
  document.getElementById(showID).style.display = "none";
  document.getElementById(id).style.display = "block";
  showID = id;
}

function windowclose(){
  
}


function addMatch(){
  
    var len = matches.length;
    
    if(len == undefined){
      len = -1;
    }
    
    matches[len+1] = "M" + (len+1);
    
    var newMatch = document.createElement("div");
    
    newMatch.innerHTML = document.getElementById("emptyMatch").innerHTML;
    newMatch.id = "M"+(len+1);
    
    document.getElementById("container").appendChild(newMatch);
    
    show("M"+(len+1));
    
    
    
}

function addTeam(){
    
    var len = teams.length;
    
    if(len == undefined){
      len = -1;
    }
    
    teams[len+1] = "T" + (len+1);
    
    var newTeam = document.createElement("div");
    
    newTeam.innerHTML = document.getElementById("emptyTeam").innerHTML;
    newTeam.id = "T"+(len+1);
    
    document.getElementById("container").appendChild(newTeam);
    
    show("T"+(len+1));
}

function setMatch(){
  
}

function setTeam(){
  
}

function dissapear(){
  active.style.display = "none";
}

// addMatch;
// addTeam;
// optionsTitle;
<commit_msg>Fixed second bug, duplicating team and match divs when clicking on the same create button multiple times<commit_after>var teams = [];
var matches = [];

var uploadStack;

var showID = "ID0";

$(document).ready(function(){
    //showID = "ID0";
    //show(showID);

    //document.getElementsByClassName('addTeam')[0].style.display = "block";
    //document.getElementById("ID0").style.display = "block";

    //teams = {};
    //matches = {};

    $(document).resize(function(){
    
    });
});

function show(id){
  document.getElementById(showID).style.display = "none";
  document.getElementById(id).style.display = "block";
  showID = id;
}

function windowclose(){
  
}


function addMatch(){
    document.getElementById(showID).style.display = "none";
  
    var len = matches.length;
    
    matches[len] = "M" + len;
    
    var newMatch = document.createElement("div");
    
    newMatch.innerHTML = document.getElementById("emptyMatch").innerHTML;
    newMatch.id = "M"+len;
    
    document.getElementById("container").appendChild(newMatch);
    
    showID = "M"+ len;
}

function addTeam(){
    document.getElementById(showID).style.display = "none";
    
    var len = teams.length;

    teams[len] = "T" + len;
    
    var newTeam = document.createElement("div");
    
    newTeam.innerHTML = document.getElementById("emptyTeam").innerHTML;
    newTeam.id = "T"+len;
    
    document.getElementById("container").appendChild(newTeam);
    
    showID = "T"+len;
}

function setMatch(){
  
}

function setTeam(){
  
}

function dissapear(){
  active.style.display = "none";
}

// addMatch;
// addTeam;
// optionsTitle;

{'fraction_non_alphanumeric': 0.17035191529118654, 'fraction_numerical': 0.005605730302086578, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1819648', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1021, 'n_words': 181}