Display licenses, full-text links and ORCIDs for Crossref DOIs.*
Generate a DOI popup for your own DOIs. Try it out with the form below:
The DOI popup is a jQuery plugin compatible with Bootstrap. In fact, the plugin extends Bootstrap's
tooltip.js
, so if you don't currently include Bootstrap in your site, you will need to include tooltip.js
and some CSS. If you want to style the popup yourself, you can exclude the premade CSS.
Required bits:
tooltip.js
. Include this if you don't have the Bootstrap javascript.doipopup.js
. Javascript for the popup plugin itself.doipopup.css
if you want the plugin
to look like it does on this site.img
directory. Put these wherever you like - their location
can be specified as an option.Now you can create the popup, passing in a DOI:
$('#my-doi-popup-button').doiPopup({doi: '10.5555/12345678'});
Alternatively, when no DOI is passed, the popup will attempt to look up a DOI from
any available dc.identifier
meta tag on the page:
$('#my-doi-popup-button').doiPopup();
The plugin's behaviour can be customised by passing additional options to the doiPopup
method. For example, set a custom image path, and custom content type labels:
$('#my-doi-popup-buttom').doiPopup({ imageLocation: '//cdn.mydomain.com/doipopup/img', contentTypeLabels: {'application/vnd.me.custom-xml+xml': 'Custom XML'} });
Option | Type | Description |
---|---|---|
doi | String | If specified, the DOI that will be looked up when the popup is shown.
If not specified, DOI will be taken from the first meta tag with name dc.identifier |
imageLocation | String | Path to location of images used by the popup. Defaults to img . |
metadataContentType | String | Content type requested when performing DOI content negotiation. Defaults
to application/vnd.citationstyles.csl+json .
|
metadataParser | Function | Function that will parse DOI content negotation response. Must return
a map with keys authors , title , licenses and resources . Defaults to a function that parses CSL JSON. |
licenseLabels | Map | Map of license URLs to image filenames. Defaults to map of CC licenses |
contentTypeLabels | Map | Map of content types (MIME types) to friendly labels. |
All options are optional!