From 52995e18006766ee0f9da86d2d0ae93183a9ab8e Mon Sep 17 00:00:00 2001 From: Eryk Kulikowski Date: Fri, 29 Sep 2023 15:39:28 +0200 Subject: [PATCH] ro-crate previewer --- previewers/betatest/ROCrate.html | 1 - previewers/betatest/js/ro-crate-dynamic.js | 10 ++++++++++ previewers/betatest/js/rocrate.js | 8 ++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/previewers/betatest/ROCrate.html b/previewers/betatest/ROCrate.html index e8659e3..eaf54bf 100644 --- a/previewers/betatest/ROCrate.html +++ b/previewers/betatest/ROCrate.html @@ -5,7 +5,6 @@ RO-Crate Preview - diff --git a/previewers/betatest/js/ro-crate-dynamic.js b/previewers/betatest/js/ro-crate-dynamic.js index cdce9ba..603fa43 100644 --- a/previewers/betatest/js/ro-crate-dynamic.js +++ b/previewers/betatest/js/ro-crate-dynamic.js @@ -119,6 +119,16 @@ async function load() { updatePage(); } +window.onhashchange = function () { + load(); +}; + +window.onload = function () { + load(); +}; + + + async function updatePage() { var hash = location.hash; diff --git a/previewers/betatest/js/rocrate.js b/previewers/betatest/js/rocrate.js index c2caa9f..291f799 100644 --- a/previewers/betatest/js/rocrate.js +++ b/previewers/betatest/js/rocrate.js @@ -10,10 +10,6 @@ function translateBaseHtmlPage() { async function writeContentAndData(data, fileUrl, file, title, authors) { addStandardPreviewHeader(file, title, authors); $('.preview').append($("