<commit_before><html>
<head>
<meta charset="UTF-8">
<title>Chess</title>
<style type="text/css">
.chessboard {
    width: 480px;
    height: 480px;
    margin: 20px;
    border: 25px solid #333;
}
.black {
    float: left;
    width: 60px;
    height: 60px;
    background-color: #999;
      font-size:40px;
    text-align:center;
    display: table-cell;
    vertical-align:middle;
}
.white {
    float: left;
    width: 60px;
    height: 60px;
    background-color: #fff;
    font-size:40px;
    text-align:center;
    display: table-cell;
    vertical-align:middle;
}
</style>
</head>
<body>
<script>
	
	function swap(s1, s2){
		var from = document.getElementById(s1);
		var to = document.getEl.ementById(s2);
		to.innerHTML = from.innerHTML;
		from.innerHTML=""
	}
	
	var i=3;
	
function squareClick(e){

  var id = e.id

	console.log('j '+id+' '+ typeof id)
	if (i%2==0){
		console.log("0000")
		document.getElementById('tobox').value=id
	} else {
		console.log("1111")
		document.getElementById('frombox').value=id
	}
	i++;
}
</script>
<div class="chessboard">
<div id="A8" onclick="squareClick(this)" class="white">{{.B.A8.Code}}</div>
<div id="B8" onclick="squareClick(this)" class="black">{{.B.B8.Code}}</div>
<div id="C8" onclick="squareClick(this)" class="white">{{.B.C8.Code}}</div>
<div id="D8" onclick="squareClick(this)" class="black">{{.B.D8.Code}}</div>
<div id="E8" onclick="squareClick(this)" class="white">{{.B.E8.Code}}</div>
<div id="F8" onclick="squareClick(this)" class="black">{{.B.F8.Code}}</div>
<div id="G8" onclick="squareClick(this)" class="white">{{.B.G8.Code}}</div>
<div id="H8" onclick="squareClick(this)" class="black">{{.B.H8.Code}}</div>

<div id="A7" onclick="squareClick(this)" class="black">{{.B.A7.Code}}</div>
<div id="B7" onclick="squareClick(this)" class="white">{{.B.B7.Code}}</div>
<div id="C7" onclick="squareClick(this)" class="black">{{.B.C7.Code}}</div>
<div id="D7" onclick="squareClick(this)" class="white">{{.B.D7.Code}}</div>
<div id="E7" onclick="squareClick(this)" class="black">{{.B.E7.Code}}</div>
<div id="F7" onclick="squareClick(this)" class="white">{{.B.F7.Code}}</div>
<div id="G7" onclick="squareClick(this)" class="black">{{.B.G7.Code}}</div>
<div id="H7" onclick="squareClick(this)" class="white">{{.B.H7.Code}}</div>

<div id="A6" onclick="squareClick(this)" class="white">{{.B.A6.Code}}</div>
<div id="B6" onclick="squareClick(this)" class="black">{{.B.B6.Code}}</div>
<div id="C6" onclick="squareClick(this)" class="white">{{.B.C6.Code}}</div>
<div id="D6" onclick="squareClick(this)" class="black">{{.B.D6.Code}}</div>
<div id="E6" onclick="squareClick(this)" class="white">{{.B.E6.Code}}</div>
<div id="F6" onclick="squareClick(this)" class="black">{{.B.F6.Code}}</div>
<div id="G6" onclick="squareClick(this)" class="white">{{.B.G6.Code}}</div>
<div id="H6" onclick="squareClick(this)" class="black">{{.B.H6.Code}}</div>

<div id="A5" onclick="squareClick(this)" class="black">{{.B.A5.Code}}</div>
<div id="B5" onclick="squareClick(this)" class="white">{{.B.B5.Code}}</div>
<div id="C5" onclick="squareClick(this)" class="black">{{.B.C5.Code}}</div>
<div id="D5" onclick="squareClick(this)" class="white">{{.B.D5.Code}}</div>
<div id="E5" onclick="squareClick(this)" class="black">{{.B.E5.Code}}</div>
<div id="F5" onclick="squareClick(this)" class="white">{{.B.F5.Code}}</div>
<div id="G5" onclick="squareClick(this)" class="black">{{.B.G5.Code}}</div>
<div id="H5" onclick="squareClick(this)" class="white">{{.B.H5.Code}}</div>

<div id="A4" onclick="squareClick(this)" class="white">{{.B.A4.Code}}</div>
<div id="B4" onclick="squareClick(this)" class="black">{{.B.B4.Code}}</div>
<div id="C4" onclick="squareClick(this)" class="white">{{.B.C4.Code}}</div>
<div id="D4" onclick="squareClick(this)" class="black">{{.B.D4.Code}}</div>
<div id="E4" onclick="squareClick(this)" class="white">{{.B.E4.Code}}</div>
<div id="F4" onclick="squareClick(this)" class="black">{{.B.F4.Code}}</div>
<div id="G4" onclick="squareClick(this)" class="white">{{.B.G4.Code}}</div>
<div id="H4" onclick="squareClick(this)" class="black">{{.B.H4.Code}}</div>

<div id="A3" onclick="squareClick(this)" class="black">{{.B.A3.Code}}</div>
<div id="B3" onclick="squareClick(this)" class="white">{{.B.B3.Code}}</div>
<div id="C3" onclick="squareClick(this)" class="black">{{.B.C3.Code}}</div>
<div id="D3" onclick="squareClick(this)" class="white">{{.B.D3.Code}}</div>
<div id="E3" onclick="squareClick(this)" class="black">{{.B.E3.Code}}</div>
<div id="F3" onclick="squareClick(this)" class="white">{{.B.F3.Code}}</div>
<div id="G3" onclick="squareClick(this)" class="black">{{.B.G3.Code}}</div>
<div id="H3" onclick="squareClick(this)" class="white">{{.B.H3.Code}}</div>

<div id="A2" onclick="squareClick(this)" class="white">{{.B.A2.Code}}</div>
<div id="B2" onclick="squareClick(this)" class="black">{{.B.B2.Code}}</div>
<div id="C2" onclick="squareClick(this)" class="white">{{.B.C2.Code}}</div>
<div id="D2" onclick="squareClick(this)" class="black">{{.B.D2.Code}}</div>
<div id="E2" onclick="squareClick(this)" class="white">{{.B.E2.Code}}</div>
<div id="F2" onclick="squareClick(this)" class="black">{{.B.F2.Code}}</div>
<div id="G2" onclick="squareClick(this)" class="white">{{.B.G2.Code}}</div>
<div id="H2" onclick="squareClick(this)" class="black">{{.B.H2.Code}}</div>

<div id="A1" onclick="squareClick(this)" class="black">{{.B.A1.Code}}</div>
<div id="B1" onclick="squareClick(this)" class="white">{{.B.B1.Code}}</div>
<div id="C1" onclick="squareClick(this)" class="black">{{.B.C1.Code}}</div>
<div id="D1" onclick="squareClick(this)" class="white">{{.B.D1.Code}}</div>
<div id="E1" onclick="squareClick(this)" class="black">{{.B.E1.Code}}</div>
<div id="F1" onclick="squareClick(this)" class="white">{{.B.F1.Code}}</div>
<div id="G1" onclick="squareClick(this)" class="black">{{.B.G1.Code}}</div>
<div id="H1" onclick="squareClick(this)" class="white">{{.B.H1.Code}}</div>

</div>

 <form action="/moveform" method="POST">
GameID: <input type="number" name="game_id" value="{{.G.Id}}">  <br>

FROM: <input id="frombox" type="text" name="from_square">
TO: <input id="tobox" type="text" name="to_square">

<input type="submit" value="Submit">
</form>
</body>
</html><commit_msg>jquery-ifying<commit_after><html>
<head>
<meta charset="UTF-8">
<title>Chess</title>
<style type="text/css">
.chessboard {
    width: 480px;
    height: 480px;
    margin: 20px;
    border: 25px solid #333;
}
.black {
    float: left;
    width: 60px;
    height: 60px;
    background-color: #999;
      font-size:40px;
    text-align:center;
    display: table-cell;
    vertical-align:middle;
}
.white {
    float: left;
    width: 60px;
    height: 60px;
    background-color: #fff;
    font-size:40px;
    text-align:center;
    display: table-cell;
    vertical-align:middle;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

</head>
<body>
<script>
$(document).ready(function(){
	var i=3;

    $("button").click(function(){
        $(".white").css('background-color', 'red');
    });
	
	$(".white").click(function(){
		squareClick($(this))		
    })
	$(".black").click(function(){
		squareClick($(this))		
    })
	
	function squareClick(e){	
		if (i%2==0){
			$("#tobox").val(e.attr("id"))
		} else {
			$("#frombox").val(e.attr("id"))
		}
		i++;
	}
	
});		
</script>
<div class="chessboard">

<div id="A8" class="white">{{.B.A8.Code}}</div>
<div id="B8" class="black">{{.B.B8.Code}}</div>
<div id="C8" class="white">{{.B.C8.Code}}</div>
<div id="D8" class="black">{{.B.D8.Code}}</div>
<div id="E8" class="white">{{.B.E8.Code}}</div>
<div id="F8" class="black">{{.B.F8.Code}}</div>
<div id="G8" class="white">{{.B.G8.Code}}</div>
<div id="H8" class="black">{{.B.H8.Code}}</div>

<div id="A7" class="black">{{.B.A7.Code}}</div>
<div id="B7" class="white">{{.B.B7.Code}}</div>
<div id="C7" class="black">{{.B.C7.Code}}</div>
<div id="D7" class="white">{{.B.D7.Code}}</div>
<div id="E7" class="black">{{.B.E7.Code}}</div>
<div id="F7" class="white">{{.B.F7.Code}}</div>
<div id="G7" class="black">{{.B.G7.Code}}</div>
<div id="H7" class="white">{{.B.H7.Code}}</div>

<div id="A6" class="white">{{.B.A6.Code}}</div>
<div id="B6" class="black">{{.B.B6.Code}}</div>
<div id="C6" class="white">{{.B.C6.Code}}</div>
<div id="D6" class="black">{{.B.D6.Code}}</div>
<div id="E6" class="white">{{.B.E6.Code}}</div>
<div id="F6" class="black">{{.B.F6.Code}}</div>
<div id="G6" class="white">{{.B.G6.Code}}</div>
<div id="H6" class="black">{{.B.H6.Code}}</div>

<div id="A5" class="black">{{.B.A5.Code}}</div>
<div id="B5" class="white">{{.B.B5.Code}}</div>
<div id="C5" class="black">{{.B.C5.Code}}</div>
<div id="D5" class="white">{{.B.D5.Code}}</div>
<div id="E5" class="black">{{.B.E5.Code}}</div>
<div id="F5" class="white">{{.B.F5.Code}}</div>
<div id="G5" class="black">{{.B.G5.Code}}</div>
<div id="H5" class="white">{{.B.H5.Code}}</div>

<div id="A4" class="white">{{.B.A4.Code}}</div>
<div id="B4" class="black">{{.B.B4.Code}}</div>
<div id="C4" class="white">{{.B.C4.Code}}</div>
<div id="D4" class="black">{{.B.D4.Code}}</div>
<div id="E4" class="white">{{.B.E4.Code}}</div>
<div id="F4" class="black">{{.B.F4.Code}}</div>
<div id="G4" class="white">{{.B.G4.Code}}</div>
<div id="H4" class="black">{{.B.H4.Code}}</div>

<div id="A3" class="black">{{.B.A3.Code}}</div>
<div id="B3" class="white">{{.B.B3.Code}}</div>
<div id="C3" class="black">{{.B.C3.Code}}</div>
<div id="D3" class="white">{{.B.D3.Code}}</div>
<div id="E3" class="black">{{.B.E3.Code}}</div>
<div id="F3" class="white">{{.B.F3.Code}}</div>
<div id="G3" class="black">{{.B.G3.Code}}</div>
<div id="H3" class="white">{{.B.H3.Code}}</div>

<div id="A2" class="white">{{.B.A2.Code}}</div>
<div id="B2" class="black">{{.B.B2.Code}}</div>
<div id="C2" class="white">{{.B.C2.Code}}</div>
<div id="D2" class="black">{{.B.D2.Code}}</div>
<div id="E2" class="white">{{.B.E2.Code}}</div>
<div id="F2" class="black">{{.B.F2.Code}}</div>
<div id="G2" class="white">{{.B.G2.Code}}</div>
<div id="H2" class="black">{{.B.H2.Code}}</div>

<div id="A1" class="black">{{.B.A1.Code}}</div>
<div id="B1" class="white">{{.B.B1.Code}}</div>
<div id="C1" class="black">{{.B.C1.Code}}</div>
<div id="D1" class="white">{{.B.D1.Code}}</div>
<div id="E1" class="black">{{.B.E1.Code}}</div>
<div id="F1" class="white">{{.B.F1.Code}}</div>
<div id="G1" class="black">{{.B.G1.Code}}</div>
<div id="H1" class="white">{{.B.H1.Code}}</div>

</div>

 <form action="/moveform" method="POST">
GameID: <input type="number" name="game_id" value="{{.G.Id}}">  <br>

FROM: <input id="frombox" type="text" name="from_square">
TO: <input id="tobox" type="text" name="to_square">

<input type="submit" value="Submit">
</form>
<button type="button">Click Me!</button>

</body>
</html>
{'fraction_non_alphanumeric': 0.2971121806738245, 'fraction_numerical': 0.03109959274342836, 'mean_word_length': 5.821338383838384, 'pattern_counts': {'":': 0, '<': 307, '<?xml version=': 0, '>': 307, 'https://': 1, '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': '5593571', 'n_tokens_mistral': 4704, 'n_tokens_neox': 4481, 'n_words': 659}