# Spaced repetition for the entire Web

&#x20;[Spaced repetition](https://learnawesome.org/topics/b874168f-6c52-408b-a93a-6dbf07ee4ec7-spaced-repetition), when embedded within the content you're reading, is extraordinarily effective for not just improving retention but also conceptual understanding of complex topics. Try that yourself with [Nicky Case's interactive about spaced-repetition itself](https://ncase.me/remember/) and [Michael Nielson and Andy Matuschak's series about Quantum Mechanics](https://quantum.country/).

&#x20;I built a [reusable component](https://github.com/learn-awesome/flashcard) that allows Web authors to embed sets of flashcards (question-answer pairs) within their writing, but that stores users' progress in the browser's `localStorage`. With this, anyone can create content in a "mnemonic medium" like the above two articles. Authors don't need to write code or use a third-part server, and users don't need to download apps. Ideally, I wanted to build and as standard HTML custom elements - which would have been easier to use, and also allowed questions and answers to be arbitrary HTML (pictures, math, audio or video clips etc), but due to the limitations of VueJS and WebComponents, this is the best I could do for now. Improvements are welcome!

&#x20;I had earlier [built a FlashCard-module](https://medium.com/learn-awesome/practice-what-you-learn-using-learnawesome-orgs-flashcards-3343d57a33b0) in [LearnAwesome.org](https://learnawesome.org/) with two features that I think are very cool: (a) A **browser-extension that infers the question from the text surrounding the answer** and lets you quickly create a flashcard about something you want to remember from your online reading and (b) **a tool that can bulk-create flashcards from your notes**, thus helping you remember things from non-textual or offline learning: videos, meetings, conferences etc. This new component should make it even more easier for online writers to adopt SRS.

## Screenshot:

![](/files/-MZaSn0Gj1rW3z5af3kK)

There are 10 levels, and a card moves to next level if recall is working after 2^level days. But for this demo, that factor has been scaled to 2^level seconds.

## Code:

{% embed url="<https://gist.github.com/eshnil/ce0cbc22e153eeb4469bf23b01b22e72>" %}

If you run into any bugs, or need any features / customizations, please come over to the [GitHub repo](https://github.com/learn-awesome/flashcard) or ping me on [Twitter](https://twitter.com/nileshtrivedi).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nilesh.trivedi.link/thoughts/spacedrep.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
