master
Michael Murtaugh 1 year ago
parent e4af70e5b4
commit 7d533c503b

@ -23,12 +23,15 @@ function make_phrase (nn, terms) {
const sleep = delaysecs => new Promise(resolve => setTimeout(resolve, delaysecs*1000));
let limit = 25;
async function make_phrases () {
let terms = await (await fetch("terms.json")).json();
// console.log("terms", terms);
let call = document.querySelector("#call");
let template = call.querySelector(".phrase");
template.remove();
let count = 0;
while (true) {
let nn = template.cloneNode(true);
call.appendChild(nn);
@ -37,6 +40,8 @@ async function make_phrases () {
console.log("out of terms, stopping");
break;
}
count += 1;
if (limit > 0 && count>=limit) { break };
await (sleep(1.0));
}
}

Loading…
Cancel
Save