Skip to content

Commit e0a51d6

Browse files
committed
Fix various details in metadata and front pages
1 parent 1f0af9f commit e0a51d6

File tree

9 files changed

+38
-174
lines changed

9 files changed

+38
-174
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ book.epub: epub/titlepage.xhtml epub/toc.xhtml epub/hints.xhtml $(foreach CHAP,$
7171
epub/toc.xhtml: epub/toc.xhtml.src $(foreach CHAP,$(CHAPTERS),epub/$(CHAP).xhtml) epub/hints.xhtml
7272
node src/generate_epub_toc.mjs $^ > $@
7373

74-
epub/%.xhtml: %.md src/render_html.js
75-
node src/render_html.js --epub $< > $@
74+
epub/%.xhtml: %.md src/render_html.mjs
75+
node src/render_html.mjs --epub $< > $@
7676

77-
epub/hints.xhtml: $(foreach CHAP,$(CHAPTERS),$(CHAP).md) src/extract_hints.mjs src/render_html.js
77+
epub/hints.xhtml: $(foreach CHAP,$(CHAPTERS),$(CHAP).md) src/extract_hints.mjs src/render_html.mjs
7878
node src/extract_hints.mjs | node src/render_html.mjs --epub - > $@
7979

8080
epubcheck: book.epub

code/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2008-2020 by Marijn Haverbeke <[email protected]>
1+
Copyright (C) 2008-2024 by Marijn Haverbeke <[email protected]>
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

code/skillsharing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"maintainers": [
1313
{
1414
"name": "Marijn Haverbeke",
15-
"email": "[email protected]",
15+
"email": "[email protected]",
1616
"web": "https://marijnhaverbeke.nl/"
1717
}
1818
],

epub/frontmatter.xhtml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,19 @@
1818
an <a href="https://eloquentjavascript.net/code/LICENSE">MIT license</a>.</p>
1919

2020
<p style="font-size: 80%">Illustrations by various artists: Cover
21-
and chapter illustrations by Madalina Tantareanu. Pixel art in
22-
Chapters 7 and 16 by Antonio Perdomo Pastor. Regular expression
23-
diagrams in Chapter 9 generated
21+
by Péchane Sumi-e. Chapter illustrations by Madalina Tantareanu.
22+
Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular
23+
expression diagrams in Chapter 9 generated
2424
with <a href="https://regexper.com/">regexper.com</a> by Jeff
2525
Avallone. Village photograph in Chapter 11 by Fabrice Creuzot.
2626
Game concept for Chapter 16
2727
by <a href="http://lessmilk.com">Thomas Palef</a>.</p>
2828

29-
<p style="font-size: 80%">The third edition was made possible
30-
by <a href="https://eloquentjavascript.net/backers3.html">325 financial backers</a>, most
31-
notably <a href="https://nextjournal.com/"><img src="img/nextjournal.png"
32-
alt="Nextjournal" class="logo"/></a>
33-
and <a href="https://www.holbertonschool.com/"><img src="img/holberton.png"
34-
alt="Holberton School" class="logo"/></a>. The second edition was
35-
supported by <a href="https://eloquentjavascript.net/backers.html">454 backers</a>, with
36-
significant contributions
37-
from <a href="https://www.mozilla.org/en-US/"><img src="img/mozilla_mini.png"
38-
alt="Mozilla" class="logo"/></a>,
39-
<a href="https://www.hackreactor.com/"><img src="img/hack_reactor_mini.png"
40-
alt="Hack Reactor" class="logo"/></a>,
41-
and <a href="https://www.ghostery.com/"><img src="img/ghostery_mini.png"
42-
alt="Ghostery" class="logo"/></a>.</p>
43-
44-
<p>A <a href="http://a-fwd.com/com=marijhaver-20&amp;asin-com=1593279507">paper
45-
version</a> of Eloquent JavaScript, including a bonus chapter, is
46-
being brought out by <a href="https://nostarch.com/">No Starch
47-
Press</a>. They also sell a more polished EPUB version that
48-
includes the bonus chapter.</p>
29+
<p>A paper version of Eloquent JavaScript, including a bonus
30+
chapter, is being brought out
31+
by <a href="https://nostarch.com/">No Starch Press</a>. They also
32+
sell a more polished EPUB version that includes the bonus
33+
chapter.</p>
4934

5035
</body>
5136
</html>

epub/style.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pre {
3030
line-height: 1.35;
3131
margin: 1rem 0;
3232
position: relative;
33-
font-size: 70%;
33+
font-size: 90%;
3434
white-space: pre-wrap;
3535
overflow-wrap: break-word;
3636
}
@@ -40,15 +40,9 @@ code, pre {
4040
}
4141

4242
code {
43-
font-size: 80%;
4443
padding: 0 2px;
4544
}
4645

47-
@media (min-width: 35em) {
48-
pre { font-size: 80%; }
49-
code { font-size: 90%; }
50-
}
51-
5246
h1, h2, h3 {
5347
font-family: 'Cinzel', Georgia, serif;
5448
font-weight: 700;

html/errata.html

Lines changed: 9 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
<article>
1313

14-
<h1>Errata<div style="font-size: 70%"><a class="subtlelink" href="index.html">Eloquent JavaScript</a>, 3rd Edition</div></h2>
14+
<h1>Errata<div style="font-size: 70%"><a class="subtlelink" href="index.html">Eloquent JavaScript</a>, 4th Edition</div></h2>
1515

16-
<p>These are the known mistakes in the <strong>third edition</strong>
17-
of the book. For errata in the first edition,
18-
see <a href="https://eloquentjavascript.net/1st_edition/errata.html">this
19-
page</a>. For the second edition,
20-
see <a href="https://eloquentjavascript.net/2nd_edition/errata.html">this
21-
page</a>. To report a problem that is not listed
22-
here, <a href="mailto:[email protected]">send me an email</a>.</p>
16+
<p>These are the known mistakes in the <strong>fourth edition</strong>
17+
of the book. For errata in other editions, see these pages: <a href="https://eloquentjavascript.net/1st_edition/errata.html">first</a>, <a href="https://eloquentjavascript.net/2nd_edition/errata.html">second</a>, <a href="https://eloquentjavascript.net/3rd_edition/errata.html">third</a>. To report a problem that is not listed
18+
here, <a href="mailto:[email protected]">send me an email</a>.</p>
19+
20+
<p><em>No issues found yet.</em></p>
21+
22+
<!--
2323
2424
<p>Issues whose page number is followed by an ordinal number are only
2525
present up to the print denoted by that number. I.e. those followed by
@@ -30,107 +30,6 @@ <h2>Chapter 2</h2>
3030
<p><strong>Page 34</strong> (1st) <em>Updating Bindings Succintly</em>: Where it
3131
says <code>counter-</code> it should be <code>counter--</code>.</p>
3232
33-
<h2>Chapter 5</h2>
34-
35-
<p><strong>Page 91</strong> (3rd) <em>Composability</em>: Due to an initial
36-
mistake in the script data set, the results of the computations on
37-
this page differ from the ones with the current, corrected data. The
38-
average year for living scripts should be 1165, the average for
39-
non-living scripts should be 204.</p>
40-
41-
<h2>Chapter 6</h2>
42-
43-
<p><strong>Page 111</strong> (2nd) <em>Inheritance</em>: In the second
44-
paragraph below the example code, instead of “<code>content</code>
45-
method”, the text should say “<code>element</code> function”.
46-
47-
<h2>Chapter 8</h2>
48-
49-
<p><strong>Page 134</strong> (2nd) <em>Error Propagation</em>: In the third
50-
paragraph of the section, a function <code>promptInteger</code> is
51-
referred to. The function is actually
52-
called <code>promptNumber</code>, and the word “whole” should be
53-
dropped from the sentence (it accepts non-whole numbers, too).</p>
54-
55-
<h2>Chapter 10</h2>
56-
57-
<p><strong>Page 168</strong> (1st) <em>Modules as Building Blocks</em>: In “each
58-
needs it own private scope“, it should say “<em>its</em> own private
59-
scope“.</p>
60-
61-
<h2>Chapter 11</h2>
62-
63-
<p><strong>Page 189/190</strong> (4th) <em>Networks are Hard</em>: The text
64-
under the code that defines <code>request</code> claims the function
65-
will give up after four attempts and a second. In fact, it gives up
66-
after three attempts, in three-quarter second.</p>
67-
68-
<h2>Chapter 14</h2>
69-
70-
<p><strong>Page 231</strong> (5th) <em>Moving Through the Tree</em>: Below
71-
the code example, the text claims
72-
that <code>for</code>/<code>of</code> loops don't work on DOM child
73-
lists. But in current (even as of the book's release) browsers they
74-
do.</p>
75-
76-
<p><strong>Page 234</strong> (2nd) <em>Creating Nodes</em>: In the
77-
code, “edition” is misspelled as “editon”.</p>
78-
79-
<h2>Chapter 15</h2>
80-
81-
<p><strong>Page 255</strong> (7th) <em>Mouse Motion</em>: The second
82-
paragraph on the page claims that you can isolate a button from
83-
the <code>buttons</code> bitmask with the remainder operator, but that
84-
doesn't really work (you'd also need a division and a floor, which
85-
gets too obscure to go into in this chapter).</p>
86-
87-
<p><strong>Page 258</strong> (3rd) <em>Load Event</em>: The description of
88-
the <code>beforeunload</code> claims that you just need to return a
89-
string from your event handler. For handlers registered
90-
with <code>addEventListener</code> you, in fact, need to
91-
call <code>preventDefault</code> and set a <code>returnValue</code>
92-
property to get the warn-on-leave behavior.</p>
93-
94-
<h2>Chapter 16</h2>
95-
96-
<p><strong>Page 271</strong> (8th) <em>Actors</em>: Near the bottom of the
97-
page, the book incorrectly uses the term <em>phase</em> (of a sinus
98-
wave) where it should say <em>period</em>.</p>
99-
100-
<p><strong>Page 278</strong> (8th) <em>Motion and Collision</em>: The code
101-
that defines the <code>touches</code> method unintentionally (though
102-
harmlessly) used <code>var</code> instead of <code>let</code> to
103-
define variables.</p>
104-
105-
<p><strong>Page 285</strong> (2nd) <em>Pausing the Game</em>: The text
106-
refers to the <code>arrow</code> binding, where it should
107-
say <code>arrowKeys</code>.</p>
108-
109-
<h2>Chapter 19</h2>
110-
111-
<p><strong>Page 336</strong> (5th) <em>The State</em>: The text mentions the
112-
property <code>fillColor</code> where it should
113-
say <code>fillStyle</code> instead.
114-
115-
<h2>Chapter 20</h2>
116-
117-
<p><strong>Page 367</strong> <em>A File Server</em>: The part that
118-
talks about “the output stream to the request” should say “the stream
119-
from the request” instead.</p>
120-
121-
<p><strong>Page 369</strong> (1st) <em>Directory
122-
Creation</em>: <code>MKCOL</code> stands for “make collection”, not “make
123-
column” as the book claims.</p>
124-
125-
<h2>Chapter 21</h2>
126-
127-
<p><strong>Page 373</strong> (3rd) <em>HTTP Interface</em>: There is a
128-
superfluous closing brace at the end of the example JSON snippet.</p>
129-
130-
<h2>Exercise Hints</h2>
131-
132-
<p><strong>Page 414</strong> (3rd) <em>A Modular Robot</em>:
133-
The <code>dijkstrajs</code> package name is misspelled
134-
as <code>dijkstajs</code>.
33+
-->
13534

13635
</article>

html/index.html

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h1>Eloquent JavaScript<div style="font-size: 70%">3rd edition (2018)</div></h2>
3131

3232
<p>This is a book about JavaScript, programming, and the wonders of
3333
the digital. You can read it online here, or buy your own
34-
<a href="https://nostarch.com/ejs3">paperback copy</a>.</p>
34+
<a href="https://nostarch.com/ejs3">paperback copy</a> (3rd edition).</p>
3535

3636
<p>Written by Marijn Haverbeke.</p>
3737

@@ -42,27 +42,15 @@ <h1>Eloquent JavaScript<div style="font-size: 70%">3rd edition (2018)</div></h2>
4242
may also be considered licensed under
4343
an <a href="https://eloquentjavascript.net/code/LICENSE">MIT license</a>.</p>
4444

45-
<p>Illustrations by various artists: Cover and chapter illustrations
46-
by <a href="http://madalinatantareanu.com/">Madalina Tantareanu</a>.
47-
Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular
48-
expression diagrams in Chapter 9 generated
45+
<p>Illustrations by various artists: Cover
46+
by <a href="http://www.pechane.com/">Péchane Sumi-e</a>. Chapter
47+
illustrations by <a href="http://madalinatantareanu.com/">Madalina
48+
Tantareanu</a>. Pixel art in Chapters 7 and 16 by Antonio Perdomo
49+
Pastor. Regular expression diagrams in Chapter 9 generated
4950
with <a href="https://regexper.com">regexper.com</a> by Jeff
5051
Avallone. Village photograph in Chapter 11 by Fabrice Creuzot. Game
5152
concept for Chapter 16 by <a href="http://lessmilk.com">Thomas
5253
Palef</a>.</p>
53-
54-
<p>The third edition was made possible
55-
by <a href="backers3.html">325 financial backers</a>, most
56-
notably <a href="https://nextjournal.com/"><img src="img/nextjournal.png"
57-
alt="Nextjournal" class=logo></a> and <a href="https://www.holbertonschool.com/"><img src="img/holberton.png" alt="Holberton School" class=logo></a>. The second edition
58-
was supported by <a href="backers.html">454 backers</a>, with
59-
significant contributions
60-
from <a href="https://www.mozilla.org/en-US/"><img src="img/mozilla_mini.png"
61-
alt=Mozilla
62-
class=logo></a>, <a href="https://www.hackreactor.com/"><img src="img/hack_reactor_mini.png"
63-
alt="Hack Reactor" class=logo></a>,
64-
and <a href="https://www.ghostery.com/"><img src="img/ghostery_mini.png"
65-
alt="Ghostery" class=logo></a>.</p>
6654
</div>
6755

6856
</div>
@@ -123,6 +111,7 @@ <h2>Other pages</h2>
123111
<li><a href="https://eloquentjavascript.net/Eloquent_JavaScript.mobi">This book as a MOBI (Kindle) file</a></li>
124112
<li><a href="https://eloquentjavascript.net/1st_edition">The first edition of the book</a></li>
125113
<li><a href="https://eloquentjavascript.net/2nd_edition">The second edition of the book</a></li>
114+
<li><a href="https://eloquentjavascript.net/3rd_edition">The third edition of the book</a></li>
126115
</ul>
127116

128117
<h2>Translations</h2>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Eloquent-JavaScript",
33
"license": "CC BY-NC 3.0",
44
"version": "0.1.0",
5-
"author": "Marijn Haverbeke <[email protected]>",
5+
"author": "Marijn Haverbeke <[email protected]>",
66
"description": "Sources for the book Eloquent JavaScript",
77
"repository": {
88
"type": "git",

pdf/book.tex

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,13 @@
9797
the book may also be considered licensed under an MIT license
9898
(\url{https://eloquentjavascript.net/code/LICENSE}).
9999
100-
The illustrations are contributed by various artists: Cover and
101-
chapter illustrations by Madalina Tantareanu. Pixel art in Chapters
102-
7 and 16 by Antonio Perdomo Pastor. Regular expression diagrams in
103-
Chapter 9 generated with \href{http://regexper.com}{regexper.com} by
104-
Jeff Avallone. Village photograph in Chapter 11 by Fabrice Creuzot.
105-
Game concept for Chapter 16 by \href{http://lessmilk.com}{Thomas
106-
Palef}.
107-
108-
The third edition of Eloquent JavaScript was made possible
109-
by \href{https://eloquentjavascript.net/backers3.html}{325 financial backers}.
100+
The illustrations are contributed by various artists: Cover by
101+
Péchane Sumi-e. Chapter illustrations by Madalina Tantareanu. Pixel
102+
art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular
103+
expression diagrams in Chapter 9 generated with
104+
\href{http://regexper.com}{regexper.com} by Jeff Avallone. Village
105+
photograph in Chapter 11 by Fabrice Creuzot. Game concept for
106+
Chapter 16 by \href{http://lessmilk.com}{Thomas Palef}.
110107
111108
\vskip 1em
112109

0 commit comments

Comments
 (0)