User:Inductiveload/jump to file

From Wikisource
Jump to navigation Jump to search
Jump To File user script

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

Installation[edit]

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

mw.loader.load('//en.wikisource.org/w/index.php?title=User:Inductiveload/jump to file/load.js&action=raw&ctype=text/javascript');

What you get[edit]

The links list for a file with an Internet Archive source
  • 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.

What you need[edit]

For external links[edit]

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[edit]

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[edit]

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[edit]

Libraries:

Server backend:

Source list[edit]

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.

Source Example File URL High-res Notes
Internet Archive edit Yes IIIF, JPG
edit No
Hathi Trust edit Yes JPG/PNG, TIFF (when available)
BnF Gallica (French national library) edit Yes IIIF, JPG
Open ONI newspapers Yes IIIF, JPG, JP2, PDF
Digital NC newspapers edit
Historic Oregon Newspapers edit
Pennsylvania Newspaper Archive
Nebraska Newspapers
National Library of Scotland edit Yes IIIF, JPG, Mirador viewer
Modernist Journals edit Yes IIIF, JPG
Goobi Viewer Yes IIIF, JPG, PDF
Universität Bielefeld edit
Humboldt-Universität zu Berlin edit
Digitale Landesbibliothek Berlin (ZLB)
Library of Congress edit Yes IIIF, JPG, JP2/TIFF
Library of Congress (newspaper) edit [1] Yes IIIF, JPG, JP2/TIFF
Digital Bodleian edit Yes IIIF, JPEG, Mirador link
Cambridge Digital Library (CUDL) edit Yes IIIF, JPG, Mirador link
British Library Manuscripts edit Yes DZI, BL viewer
Yale Digital Collection edit Yes IIIF, JPG, PDF, Mirador link
Miami University Digital Collections edit Yes IIIF, JPG