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 52995e1 commit a1162d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion previewers/betatest/ROCrate.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<title class="rocratePreviewText">RO-Crate Preview</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="js/xss.js"></script>
<script type="text/javascript" src="js/rocrate.js"></script>
<script src="lib/jquery.i18n.js"></script>
<script src="lib/jquery.i18n.messagestore.js"></script>
<script src="lib/jquery.i18n.language.js"></script>
Expand All @@ -32,6 +31,7 @@
<main><img id='logo' alt='Site Logo'>
<h1 class="page-title rocratePreviewText">RO-Crate Preview</h1>
<div class='preview-container'>
<div id="scripts"></div>
<div class='preview-header'></div>
<div class='preview'>
<div class="jumbotron">
Expand Down
4 changes: 1 addition & 3 deletions previewers/betatest/js/rocrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ function translateBaseHtmlPage() {

async function writeContentAndData(data, fileUrl, file, title, authors) {
addStandardPreviewHeader(file, title, authors);
$('.preview').append($("<script type=\"application/ld+json\"/>").html(data));
$('.preview').append($("<script type=\"text/javascript\" src=\"js/ro-crate-dynamic.js\"/>"))
document.location.reload(true)
document.getElementById('scripts').innerHTML = '<script type="application/ld+json">' + data + '</script><script type="application/ld+json"/>';
}

0 comments on commit a1162d7

Please sign in to comment.