hypothesis/h — pull request #1514 by tilgovi (2014-09-19 10:24:47+00:00)
Title: Alternate PDF.js inclusion

Here's an alternate idea for (re)-inclusion of PDF.js.

This contains the PDF.js build (`node make generic`) of v1.0.68 copied with only the single line change to add embed.js to the viewer.

The embed.txt is refactored to take the bootstrap code that used to be an inline script and put it in a bootstrap.js file. The embed is still the only template, but all it does beyond triggering yepnope on the assets is to inject a link rel="sidebar" type="application/annotator+html" tag into the document. That then becomes available to the script tags yepnope adds for the assets, and becomes the source of the iframe. The rest of the configuration is no longer query parameters, but taking by invoking `window.hypothesisConfig` (if it exists) in the context of the default options object.

This options object will become the configuration point for the client-side portion of the SSO work in my other PR, so it gets us closer to that.