In the world of print stylesheets, there’s long been a fairly well-established technique for expanding link URLs inline in body text, and printing them inline. The result works, but it breaks the reading flow of the text. A better solution has been around for at least a century in typesetting: the footnote. The challenge is creating and inserting the footnotes, which must be done with JavaScript.

This short tutorial will show how to capture print events with JavaScript and insert dynamic content exclusively for printers, while being invisible in the browser window.


Home to both the Solar System's highest mountain (Olympus Mons), and deepest canyon (Valles Marineris), Mars is the also the planet most likely to support life outside of Earth; seasonal methane plumes observed over several decades have yet to be explained.

After addressing 3D space and lighting, I rather rushed to the end of the previous article in order to gain a rendered image. In this piece I’ll backtrack a little, covering threeJS objects and materials in detail, before re-approaching the rendering process.

Streaks of red light on a road, caught in a long-expose photograph


Being confronted with a series of numbers and having to find the largest or smallest in the set is a common coding task. While it’s entirely possible to use a mathematical operator in JavaScript to find an answer, or even a series of if statements, the Math.max function (and it’s opposite, Math.min) are more effective and efficient.