User:Inductiveload/jump to file

This is a user script to add some functions to do with locating files at external sources from the Page namespace.

Installation
Install using the loader below. This will only load the main JS when appropriate:



What you get



 * A list of pages that transclude the current Page namespace page.
 * A link to the file at Commons
 * A link to the file at an external source, if listed in the file information
 * A direct link to the high-resolution original image at the external source
 * Optional direct loading of the high-res images into the image viewer at Wikisource

Supported external sources: see below.

For external links
The file's information page should have a link to the work at the external site. For example, an Internet Archive link looks like this: https://archive.org/details/franklesliesilluv1718lesl. This link is present on File:Frank Leslie's Illustrated Newspaper Vol. 18.pdf, so this script works.

Loading high-res images
You can allow the script to load a high-res image (if found) from the the external source by clicking "High-res options" and checking the checkbox.



The image will be loaded from the external source and will replace the image in the Page editor panel. This only works when editing.

The offset is provided to adjust for files that have had pages inserted or removed, or have been split:
 * If the file at the external source is identical, set "0"
 * If a cover page (e.g. a Google page) has been removed, set "1"

Any other number can be set. For example Index:Frank Leslie's Illustrated Newspaper Vol. 18.pdf has an offset of "192", because it's the second half of a file that was split (it was v. 17–18).

Privacy
Some parts of this script make requests to third parties, which can leak your personal information, such as IP and user-agent, as well as the work/page you are looking at:


 * Links are gathered by a server-side program at Toolforge on your behalf - your personal information will not be shared at this point
 * High-res images and IIIF data files are loaded directly from third-parties (e.g. the IA, Hathi, etc.) - if you do not agree to this, do not enable hi-res mode.

Requests to WMF wikis (e.g. Wikisource, Commons and Wikidata) are, as always, covered by the WMF Privacy Policy. The Toolforge Pagelist server doesn't collect any personal information.

Technical

 * ../jump to file.js/ - main script
 * ../jump to file/load.js/ - loader

Libraries:
 * ../LibParamUi.js
 * ../LibParamUi.css

Server backend:
 * https://pagelister.toolforge.org/img_links
 * Bugs and requests: https://phabricator.wikimedia.org/project/board/5221/

Source list
In this table, the "high-res" column means that a high-resolution file can be loaded into the page viewer, often by an IIIF tile source. Even if a high-res format that can be loaded into the viewer doesn't exist, there may be high-quality images in formats such as TIFF or JP2 available from the source that can be used as a source for image extraction.