This bug would cause the decoration script to run in an infinite loop as it
presumably attempts to decorate new elements it itself created.
(Can’t say for sure, I’m using Otter Browser on a Pentium M which isn’t
exactly the most ideal development setup. lol)
Shuffled things around, improved some things, made some things worse.
I’m probably gonna undo some of the changes made here but there are
language improvements in here as well that I wanna keep.
The index doesn’t have to be a PHP file since there is no need to
generate the list of chapters anew every time the ToC is opened.
Instead, the list of chapters is generated once, ahead of time, and
saved to the index.html.
As an added bonus, this allows the ToC to be generated and used
as a local file.
Partially following comments I left while converting the whole thing to
HTML, partially I just saw something that I wanted to change.
I found somelogic issues that I’m gonna have to fix another time.