I learnt that local storage is the preferred way to save a user's preferences. A cookie is sent to the server on every request, which makes for needless traffic. I "borrowed" the idea from the Spring Framework docs.
* Declare duplicate jQuery selectors as variables
* Remove extra semicolons after function declarations
* Remove leftover jquery.js from Java/XML toggle implementation
When the Java/XML toggle implementation was introduced,
jquery-3.2.1.min.js replaced the old jquery script in toggle.adoc
and the old jquery script was accidentally leftover as a result.
While working on another feature, I noticed that the document toggle wasn't updating the ToC. I fixed that. (It matters only in the case where entire headings are toggled, but we do have one such case.)