Skip to content

Commit b85ec0a

Browse files
author
Lucien Grondin
committed
remove code for fetching file
1 parent 26f0abc commit b85ec0a

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

chess-openings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link rel="stylesheet" href="css/chessboard-1.0.0.min.css">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
</head>
9-
<body>
9+
<body onload="main();">
1010
<h1>Chess Openings</h1>
1111
<div id="myBoard" style="width: 400px"></div>
1212
<output id=log type=text></output><br>

chess-openings.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ const SECOND = 1,
1818

1919
LANG = 'en-US';
2020

21-
fetch("chess/repertoire.json")
22-
.then(response => response.json())
23-
.then(main);
24-
2521
function $(x) { return document.getElementById(x); }
2622
function addElement(tag, innerHTML) {
2723
let element = document.createElement(tag);
@@ -30,7 +26,7 @@ function addElement(tag, innerHTML) {
3026
return element;
3127
}
3228

33-
function main(json) {
29+
function main() {
3430

3531
if (typeof sessionStorage === "undefined") {
3632
let p = addElement('p');
@@ -39,7 +35,6 @@ function main(json) {
3935
}
4036

4137
let position = new Position(),
42-
repertoire = json,
4338
move_history = [],
4439
sounds = {
4540
move: document.getElementById("movesound"),

0 commit comments

Comments
 (0)