* Uses a stylesheet to hide the reverse link in the popover rather than monkeying around with the dom in JS
* Javascript event handler catches clicks on the reverse buttons in the footnote list at the bottom of the page
and scrolls the document back to the source, rather than opening the document in a browser window.
These changes are the bare minimum required to get footnotes to appear and function on the article page.
* The newsfoot.js script now wraps everything in an IIFE to prevent bleed to other scripts
* Stylesheets are included in the main stylesheet, with the colors extracted out into separate selectors
Currently missing the arrow pointing to the footnote link, and no consideration exists for mobile presentation
beyond a max-width: 100vh on the footnote popover.
The fix used for iOS (keep a queue of preloaded web views) isn't appropriate
for macOS since the first view is used immediately. That approach would
solve the flash of white when first searching, but not the flash of white
when launching the application.
Instead, use a modification of the original solution used for iOS:
- wrap the web view in a box with an appropriate background color
- hide the web view at creation
- show the web view after* the first load
This doesn't suffer the latency problem that the same solution on iOS had
because the first load is always local, "No Selection" HTML.
[*] Showing the view immediately after the first load still causes the flash
to white. Waiting 0.05 seconds avoids this. That's a fairly terrible hack,
but I don't have a better solution at present.