Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d7b18e8f86 | |||
6a5b1589ef | |||
8d265c400c |
@ -1,10 +1,13 @@
|
||||
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:
|
||||
|
||||
* Configurable timing between cards.
|
||||
* Support for prompts only or prompts and answers.
|
||||
* 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).
|
||||
* In-order, reverse-order, and random-order traversal of the cards.
|
||||
* Support for saving/loading settings and inputs (locally to the browser).
|
||||
* 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
|
||||
|
@ -127,13 +127,15 @@
|
||||
const promptDiv = document.createElement("div");
|
||||
promptDiv.classList.add('prompt');
|
||||
promptDiv.innerHTML = FC.transformContent(item.prompt);
|
||||
|
||||
const answerDiv = document.createElement("div");
|
||||
answerDiv.classList.add('answer');
|
||||
answerDiv.innerHTML = FC.transformContent(item.answer);
|
||||
|
||||
newCardDiv.appendChild(promptDiv);
|
||||
newCardDiv.appendChild(answerDiv);
|
||||
|
||||
if (item.answer) {
|
||||
const answerDiv = document.createElement("div");
|
||||
answerDiv.classList.add('answer');
|
||||
answerDiv.innerHTML = FC.transformContent(item.answer);
|
||||
newCardDiv.appendChild(answerDiv);
|
||||
}
|
||||
|
||||
return newCardDiv;
|
||||
};
|
||||
|
||||
@ -272,6 +274,8 @@
|
||||
};
|
||||
|
||||
FC.importCardSetFromURL = function(ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
fetch(FC.$('input[name=importURL]').value)
|
||||
.then(resp => resp.json())
|
||||
.then(set => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user