Skip to content

Instantly share code, notes, and snippets.

@redroot
Last active March 10, 2016 13:26
Show Gist options
  • Save redroot/f35de01c1f6f3e79b41a to your computer and use it in GitHub Desktop.
Save redroot/f35de01c1f6f3e79b41a to your computer and use it in GitHub Desktop.
<html>
<title>RefME Cite Button</title>
</head>
<body>
<section>
<div class="col">
<div id="refme-auto-cite"></div>
<dl>
<dt>Title:</dt>
<dd>Snow Crash</dd>
<dt>Author:</dt>
<dd>Neal Stephenson</dd>
</dl>
</div>
</section>
<script src="https://widget.refme.com/scripts/refme-cite.js"></script>
<script type="text/javascript">
window.addEventListener('load', function () {
RefME.createButton({
element: '#refme-auto-cite', // or wherever it is
config: {style: 'refme-apa'}, // you can pass in the name of the style to use.
data: [
{
lookup: "9780552995818",
// the citation meta-data in citeproc.js format
id: "9780552995818", // any unique id - ISBNs would be suitable.
title: "Palace of Desire",
author: [{
given: 'Naguib Mahfouz',
family: 'Author'
}],
type: 'book'
}
]
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment