CONTENTdm

Many institutions use OCLC’s CONTENTdm to publish their digital collections. IIIF Manifests are available for items in CONTENTdm but the links are not always published in the interface. This bookmarklet opens the IIIF Manifest for the page.

Installation

Drag the button below to the favorites bar of your browser in order to install this bookmarklet. Alternatively, you can copy the code below and paste it in the address or URL field of a new bookmark.

Get IIIF Manifest

Testing

Some links to test the bookmarklet:

Due to different configurations this bookmarket will not work for all CONTENTdm collections. Feel free to open an issue to add support for a specific collection.

Source code

javascript: (function () {
    // Get all the relevant parts from the url
    const regexPattern = /http.*:\/\/(?<base>.*?)\/digital\/collection\/(?<collection>.*?)\/id\/(?<id>\w*)/;
    const matches = window.location.href.match(regexPattern).groups;
    // Construct the manifest url
    const manifestUrl =
        'https://' +
        matches.base +
        '/iiif/' +
        matches.collection +
        ':' +
        matches.id +
        '/' +
        'manifest.json';
    // Navigate to the manifest
    location = manifestUrl;
})()

Minimized version:

javascript:(function(){const regexPattern=/http.*:\/\/(?<base>.*?)\/digital\/collection\/(?<collection>.*?)\/id\/(?<id>\w*)/;const matches=window.location.href.match(regexPattern).groups;const manifestUrl='https://'+matches.base+'/iiif/'+matches.collection+':'+matches.id+'/'+'manifest.json';location=manifestUrl})();