<h3>Mouse Button State</h3>
        <pre id="mouseButtonState">[no clicks yet]</pre>

        <h3 id="document-end">Document end</h3>
        <script>
            // Mouse button state, taken from:
            // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
            const buttonNames = ["left", "right", "wheel", "back", "forward"];
            function mouseButtonPressed(event, buttonName) {
               // Use binary `&` with the relevant power of 2 to check if a given button is