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 f2bbf89 commit a005bd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions previewers/betatest/js/rocrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ function translateBaseHtmlPage() {

async function writeContentAndData(data, fileUrl, file, title, authors) {
addStandardPreviewHeader(file, title, authors);
const scripts = document.getElementById("scripts");
var s1 = document.createElement("script");
s1.type = "application/ld+json";
s1.text = data;
document.getElementById("scripts").append(s1);
scripts.append(s1);
var s2 = document.createElement("script");
s2.type = "text/javascript";
s2.src = "js/ro-crate-dynamic.js";
document.getElementById("scripts").append(s2);
dispatchEvent(new Event('load'));
scripts.append(s2);
scripts.dispatchEvent(new Event('load'));
}

0 comments on commit a005bd7

Please sign in to comment.