<commit_before>/* Code Written By <NAME> */

//flames logic
function flames() {
  var r=/\s+/g;
 var fname=document.getElementById("name1").value;
 var fr=fname.replace(r,"");
 var flen=fr.length; console.log(flen+fr);
 var sname=document.getElementById("name2").value;
 var sr=sname.replace(r,"");
 var slen=sr.length; console.log(slen+sr);
 var i,j,n,p=0;
	for(i=0;i<flen;i++)
	{
		for(j=0;j<slen;j++)
		{
			if(fr.charAt(i)==sr.charAt(j))
			{
				p++;
		}
		}
		if(p!=0)
		{
			p++;
		}
	}
	for(n=0;n<flen;n++)
	{
		if(fr.charAt(0)==sr.charAt(n))
		{
			p++;
	}
	}
	switch(p%6)
	{
		case 1 : document.getElementById("print").innerHTML = '<p class="fr">FRIENDS</p>';
			break;
		case 2: document.getElementById("print").innerHTML = '<p class="lo">LOVERS</p>';
			break;
		case 3: document.getElementById("print").innerHTML = '<p class="af">AFFECTIONATE</p>';
			break;
		case 4: document.getElementById("print").innerHTML = '<p class="mr">MARRIAGE</p>';
			break;
		case 5: document.getElementById("print").innerHTML = '<p class="em">ENEMY</p>';
			break;
		case 6: document.getElementById("print").innerHTML = '<p class="si">SISTER</p>'
			break;
	}
}

//Reload function
function again() {
	location.reload(false);
}

//User form layout
document.getElementById('flames_magic').innerHTML = '<p>Your Name</p><input type="text" id="name1"><br><p>Your Crush Name</p><input type="text" id="name2"><br><button onclick=flames()>FLAMES !</button><br><button onclick=again()>Try another one !</button><br><p id="print"></p>';<commit_msg>alert added and new try button display<commit_after>/* Code Written By <NAME> */

//flames logic
function flames() {
 var r=/\s+/g;
 var d= '<button onclick=again()>Try another one !</button><br>';
 var fname=document.getElementById("name1").value;
 var fr=fname.replace(r,"");
 var flen=fr.length; console.log(flen+fr);
 var sname=document.getElementById("name2").value;
 var sr=sname.replace(r,"");
 var slen=sr.length; console.log(slen+sr);
 var i,j,n,p=0;
    if((fr=="" || sr=="") || (fr=="" && sr==""))
    {
        alert("No names have been");
    }
    else 
    {
	for(i=0;i<flen;i++)
	{
		for(j=0;j<slen;j++)
		{
			if(fr.charAt(i)==sr.charAt(j))
			{
				p++;
		}
		}
		if(p!=0)
		{
			p++;
		}
	}
	for(n=0;n<flen;n++)
	{
		if(fr.charAt(0)==sr.charAt(n))
		{
			p++;
	}
	}
    }
	switch(p%6)
	{
		case 1 : document.getElementById("print").innerHTML = d+'<p class="fr">FRIENDS</p>';
			break;
		case 2: document.getElementById("print").innerHTML = d+'<p class="lo">LOVERS</p>';
			break;
		case 3: document.getElementById("print").innerHTML = d+'<p class="af">AFFECTIONATE</p>';
			break;
		case 4: document.getElementById("print").innerHTML = d+'<p class="mr">MARRIAGE</p>';
			break;
		case 5: document.getElementById("print").innerHTML = d+'<p class="em">ENEMY</p>';
			break;
		case 6: document.getElementById("print").innerHTML = d+'<p class="si">SISTER</p>'
			break;
	}
}

//Reload function
function again() {
location.reload(false);
}

//User form layout
document.getElementById('flames_magic').innerHTML = '<p>Your Name</p><input type="text" id="name1"><br><p>Your Crush Name</p><input type="text" id="name2"><br><button onclick=flames()>FLAMES !</button><p id="print"></p>';
{'fraction_non_alphanumeric': 0.2302448094205144, 'fraction_numerical': 0.010536101642392316, 'mean_word_length': 4.56551724137931, 'pattern_counts': {'":': 0, '<': 66, '<?xml version=': 0, '>': 60, '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': '6369303', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1241, 'n_words': 211}