Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
JavaScript script to enable Content-Negotiation call for DataCite metadata in format
$(document).ready(function() {
var identifier = ""; //for example 10.5284/1015681
if (identifier === undefined) {
var doi = new URL(identifier);
var url = "";
url += '/application/vnd.schemaorg.ld+json/' + doi.pathname;
url: url,
dataType: 'text', // don't convert JSON to Javascript object
success: function(data) {
.attr('type', 'application/ld+json')
error: function (error) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.