diff --git a/.gitignore b/.gitignore
index 86f8105..d326974 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
tmp
__pycache__
+d2/book1/books
diff --git a/d2/book1/book.js b/d2/book1/book.js
index afa9d92..f92928e 100644
--- a/d2/book1/book.js
+++ b/d2/book1/book.js
@@ -1,4 +1,4 @@
-$(window).on('load', () => {
+(function() {
window.context.books.push(`
DEATH of a HERO
@@ -4747,4 +4747,5 @@ $(window).on('load', () => {
In an agony of helpless grief and pity.
`);
-});
+ window.context.update_books();
+})();
diff --git a/d2/book1/index.html b/d2/book1/index.html
index 07079a0..c406473 100644
--- a/d2/book1/index.html
+++ b/d2/book1/index.html
@@ -13,6 +13,10 @@
Current Sentence:
@@ -59,6 +63,7 @@
+
diff --git a/d2/book1/script.js b/d2/book1/script.js
index 9c11a63..c5164d8 100644
--- a/d2/book1/script.js
+++ b/d2/book1/script.js
@@ -1,6 +1,4 @@
$(window).on('load', () => {
- window.context = {};
- window.context.books = [];
var synth = window.speechSynthesis;
@@ -29,9 +27,20 @@ $(window).on('load', () => {
$('.screen .widget input[name=total-sentences]'),
read_aloud:
$('.screen .widget input[name=read-aloud]'),
+ add_book:
+ $('.screen .widget input[name=add-book]'),
debug:
$('.screen .widget input[name=debug]'),
};
+ context.update_books = () => {
+ context.ui.books_select.empty();
+ window.context.books.map(
+ (o, i) => $('