

The code in uv-cp.js is contained in a single function so can safely live alongside other JavaScript code. If you already have a JavaScript file added on the Custom Scripts page, you will need to modify that JavaScript file and copy the entire contents of uv-cp.js into the main custom JS file for your CONTENTdm site. If you have no other custom JavaScript running on your website, upload the uv-cp.js file in the Website Configuration Tool on the Custom > Custom Scripts dialog. Note that this file’s name may change in the future to include a version number if there are updates to the script code. This JavaScript file is called uv-cp.js and can be downloaded from the Universal Viewer section of the Cookbook recipe portal. Loads Universal Viewer and renders it into the custom page container with the IIIF Manifest of the item.Inserts a Universal Viewer button on the item page of any records that have IIIF API support, and.This recipe requires only a single JavaScript file that is used in conjunction with the uv.html file above. Upload the custom JavaScript file that inserts a Universal Viewer button and loads the viewer.Create an empty custom page, which serves as the container for Universal Viewer.

There are two pieces needed to integrate Universal Viewer. The files used in this recipe can be viewed and downloaded from the CONTENTdm Cookbook download portal under the Universal Viewer section. The design of this recipe is simpler than the Mirador recipe because it loads the Universal Viewer application from a public content delivery network called jsDelivr rather than serving it directly from CONTENTdm. This recipe uses version 4 of Universal Viewer and integrates it into CONTENTdm in the same way as the other IIIF-based viewer recipes. Any IIIF content can be loaded and displayed in Universal Viewer. Universal Viewer is a community-developed, IIIF-based viewer that has similar functionality to Mirador. Download: View and download source code in CONTENTdm Cookbook Demo Site.
