Compare commits

..

No commits in common. "master" and "2.0" have entirely different histories.
master ... 2.0

2 changed files with 7 additions and 14 deletions

View File

@ -1,13 +1,10 @@
Simple Flashcards takes a set of text values, one value per line, and shows Simple Flashcards takes a set of text values, one value per line, and shows
them to the user one at a time. It has the following features: them to the user one at a time. It has the following features:
* Support for prompts only or prompts and answers. * Configurable timing between cards.
* Image URLs can be used as values for pictoral flashcards.
* Configurable timing between cards and answers.
* Configurable size of the text (small, medium, and large). * Configurable size of the text (small, medium, and large).
* In-order, reverse-order, and random-order traversal of the cards. * In-order, reverse-order, and random-order traversal of the cards.
* Support for saving/loading settings and inputs (locally to the browser). * Support for saving/loading settings and inputs (locally to the browser).
* Support for importing/exporting saved card sets as a file. * Support for importing/exporting saved card sets as a file.
* Support for importing saved card sets from a URL.
Simple Flashcards is available at http://flashcards.jdbernard.com Simple Flashcards is available at http://flashcards.jdbernard.com

View File

@ -127,15 +127,13 @@
const promptDiv = document.createElement("div"); const promptDiv = document.createElement("div");
promptDiv.classList.add('prompt'); promptDiv.classList.add('prompt');
promptDiv.innerHTML = FC.transformContent(item.prompt); promptDiv.innerHTML = FC.transformContent(item.prompt);
newCardDiv.appendChild(promptDiv);
if (item.answer) {
const answerDiv = document.createElement("div"); const answerDiv = document.createElement("div");
answerDiv.classList.add('answer'); answerDiv.classList.add('answer');
answerDiv.innerHTML = FC.transformContent(item.answer); answerDiv.innerHTML = FC.transformContent(item.answer);
newCardDiv.appendChild(answerDiv);
}
newCardDiv.appendChild(promptDiv);
newCardDiv.appendChild(answerDiv);
return newCardDiv; return newCardDiv;
}; };
@ -274,8 +272,6 @@
}; };
FC.importCardSetFromURL = function(ev) { FC.importCardSetFromURL = function(ev) {
ev.preventDefault();
fetch(FC.$('input[name=importURL]').value) fetch(FC.$('input[name=importURL]').value)
.then(resp => resp.json()) .then(resp => resp.json())
.then(set => { .then(set => {