Skip to content

Commit

Permalink
Update custom.js
Browse files Browse the repository at this point in the history
  • Loading branch information
little9 authored Aug 15, 2024
1 parent b1bedbb commit 275f38d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions 01JHU_INST-JHU/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
};

function loadJS(FILE_URL, async = true) {
let hideEle = document.createElement("script");
hideEle.text = `
document.querySelector('prm-static').previousSibling.remove();
document.querySelector('prm-static').nextSibling.remove();`
document.body.appendChild(hideEle);

let scriptEle = document.createElement("script");
scriptEle.setAttribute("src", FILE_URL);
scriptEle.setAttribute("type", "module");
Expand All @@ -105,8 +111,6 @@
console.log("Error on loading file", ev);
});

document.querySelector('prm-static').previousSibling.remove();
document.querySelector('prm-static').nextSibling.remove();
}

loadJS('https://jhu-library-applications.github.io/showcase-bundle/discovery-showcase.bundled.js');
Expand Down

0 comments on commit 275f38d

Please sign in to comment.