• Nick Stenning's avatar
    Fix detection of PDF URIs · 84867512
    Nick Stenning authored
    70c9b9b broke a number of features of the h client that were toggled on
    for PDF documents, by renaming the Annotator PDF plugin from
    `Annotator.Plugin.PDF` to `Annotator.Plugin.Pdf`.
    
    While it's certainly an ugly side-effect of a straightforward rename,
    the problem is that `Guest#getDocumentInfo` (to pick one example) used
    `@plugins.PDF?` to determine whether to use the PDF metadata
    (provided by the PDF.js `PDFViewerApplication`).
    
    In the absence of PDF metadata, `getDocumentInfo` falls back to using
    `window.location.href`, which explains the behaviour identified
    in #2506.
    
    Fixes #2506.
    84867512
pdf-sidebar.coffee 268 Bytes