Skip to content

Commit

Permalink
ro-crate previewer
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Sep 29, 2023
1 parent 0363b3f commit 6860eda
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions previewers/betatest/js/rocrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ function translateBaseHtmlPage() {

async function writeContentAndData(data, fileUrl, file, title, authors) {
addStandardPreviewHeader(file, title, authors);
$('.preview').append($('<script type="application/ld+json"/>').html(data));
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "js/ro-crate-dynamic.js";
$('.preview').append(s);
window.onhashchange();
var s1 = document.createElement("script");
s1.type = "application/ld+json";
s1.text = data;
document.getElementById("scripts").append(s1);
var s2 = document.createElement("script");
s2.type = "text/javascript";
s2.src = "js/ro-crate-dynamic.js";
document.getElementById("scripts").append(s2);
}

0 comments on commit 6860eda

Please sign in to comment.