Commit f57948c3 authored by PTSEFTON's avatar PTSEFTON
Browse files

Moving to dynamically generated HTML

parent 19701ca7
This diff is collapsed.
const Preview = require("./ro-crate-preview.js");
var meta;
var preview
async function load() {
meta = JSON.parse($("script[type='application/ld+json']").text());
preview = await new Preview(meta);
var hash = location.hash;
if (hash) {
preview.display(unescape(hash.replace("#", "")));
}
else {
preview.display(preview.root["@id"]);
}
}
window.onhashchange = function() {
load()
}
$(document).ready(load);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment