Inline Hypothesis footnotes

The example illustrated in this page comes from the Wikipedia article on the Tubbs Fire. In that article, the phrase "historic wildfire corridors" links to a Press Democrat story that contains this passage:

The county has four "historic wildfire corridors," including the Hanly Fire area, Sonoma Valley (scene of the Cavedale fires in 1925 and 1966), the Geysers (with fires in 1988, 1999 and 2004 that covered a total of 22,000 acres) and the Guerneville area (hit by major fires in 1923 and 1961, the latter burning 5,800 acres, 18 homes and $500,000 worth of timber. In Santa Rosa, about one-fourth of the city's residents live within four moderate, high and very high severity fire zones, mostly hilly, wooded areas all east of Highway 101. Two of the zones bracket Annadel State Park: One of them east of Summerfield Road, the other along Highway 12 including parts of Oakmont. The largest zone covers a broad swath of northeast Santa Rosa, including all of Fountaingrove and the Chanate Road, Hidden Valley and Brush Creek areas down to Highway 12.
The Wikipedia citation initially pointed to the top of the Press Democrat page. It was improved by turning that link into a Hypothesis direct link to the above segment. That provides helpful context for a reader of the Wikipedia page who, when following the citation link, would otherwise need to scan the cited story to find the link's intended target.

Of course there are many citations in the Wikipedia article. A reader who wants to review target passages for multiple citations would need to open a tab for each. This example shows an additional improvement: target segments could be automatically included in the Wikipedia article to provide inline context.

To activate inline Hypothesis footnotes in a web page that contains Hypothesis direct links, you can add these script tags at the end of a page.

<script src="https://jonudell.net/hlib/hlib/hlib.bundle.js">
<script src="https://jonudell.net/h/footnotes.js">

(You can of course host the script files elsewhere.)

This method can work not only in Wikipedia, but in any content management system that publishes pages with Hypothesis direct links.

The example

(The next paragraph is from the Wikipedia article. It contains a Hypothesis direct link. When the script runs, that link is augmented with a superscript that points to a footnote that's dynamically included below. And the footnote points back to the direct link.)

Sonoma County has four "historic wildfire corridors," including the Hanly Fire area. New homes in the fire zones must meet building code requirements for fire-resistant materials for siding, roofing and decks, with protected eaves to keep out windblown embers. Those measures made little difference. For example, despite a 100-foot fire break that ringed much of the Fountaingrove II subdivision, which consisted of 600 upscale homes in the same path as the Hanly Fire, virtually the entire subdivision was destroyed by the Tubbs Fire.

(This section represents the remainder of the article. Scroll down to see footnotes, or jump there from the superscript 1 above.)


























(The following footnotes section is generated by the script.)