hypothesis / hypothesis/pdf.js-hypothes.is

Permit specifying additional options via URL

Open
#19 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
408
Forks
84
PR merge metrics
No merged PRs in 30d

Description

It appears that [URL-based parameters are parsed](https://github.com/hypothesis/pdf.js-hypothes.is/blob/6dd681bf04fd9b0121c7c03de3b7b9bb3a3a1101/viewer/web/viewer.js#L1747) from the viewer URL in order to configure the PDF reader, but only the `file` parameter is currently supported.

Setting other viewer options, like `openSidebar`, can't currently be specified there.

It would be nice if other viewer options could be provided as URL parameters to `viewer.html`! (When safe to provide that way, of course.)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in viewer/web/viewer.js around the URL-parameter parsing at line 1747 and inspect how viewer.html options are configured. Determine which options are safe to accept beyond file, including openSidebar, then verify that supported options can be supplied through the viewer URL without changing existing file-parameter behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.