Add option to sideload js
This commit is contained in:
parent
450f848fac
commit
fb518cc56f
@ -1,4 +1,7 @@
|
|||||||
|
(async function() {
|
||||||
|
|
||||||
|
// const response = await fetch('./sample.json');
|
||||||
|
// const data = await response.json();
|
||||||
const data = {
|
const data = {
|
||||||
|
|
||||||
"size_x" : 8,
|
"size_x" : 8,
|
||||||
@ -28,7 +31,7 @@ const data = {
|
|||||||
2: "test",
|
2: "test",
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
const wrap = document.createElement("div");
|
const wrap = document.createElement("div");
|
||||||
wrap.id = "wrap";
|
wrap.id = "wrap";
|
||||||
@ -105,3 +108,5 @@ for (const hintId in data.hints) {
|
|||||||
hintsArea.appendChild(li);
|
hintsArea.appendChild(li);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
|
30
sample.json
Normal file
30
sample.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
"size_x" : 8,
|
||||||
|
"size_y" : 8,
|
||||||
|
|
||||||
|
"cells" : {
|
||||||
|
|
||||||
|
// x-axis
|
||||||
|
1 : {
|
||||||
|
// y-axis
|
||||||
|
1 : {
|
||||||
|
"character" : "a",
|
||||||
|
"hidden" : false,
|
||||||
|
"hint" : 1,
|
||||||
|
"in_solution" : 3,
|
||||||
|
},
|
||||||
|
2 : {
|
||||||
|
"character" : "b",
|
||||||
|
// "hidden" : true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"hints" : {
|
||||||
|
1: "hallo",
|
||||||
|
2: "test",
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user