Hi,
I am trying for the first type to include a server based NLM URL to substance io reader.
I was addin the follwoing lines
// Endpoint must have CORS enabled, or file is served from the same domain as the app
var documentURL = "
http://localhost:8000/neoliberalism.xml";
var app = new Lens({
document_url: documentURL
});
and started the simple python server.
what am i doing wrong there?
<script>
if (window.Substance === undefined) {
window.Substance = require("/src/substance.js");
}
// Endpoint must have CORS enabled, or file is served from the same domain as the app
var documentURL = "
https://s3.amazonaws.com/elife-cdn/elife-articles/00778/elife00778.xml";
var app = new Lens({ document_url: documentURL });
// Create a new Lens app instance
// --------
//
// Injects itself into body
$.get("data/content.json")
.done(function(data) {
if (Object.prototype.toString.call(data) === "[object String]") {
data = JSON.parse(data);
}
var app = new Substance.Reader({
document: data
});
$(function() {
app.start();
});
})
.fail(function(err) {
$('body').html(JSON.stringify(err));
});
</script>