summaryrefslogtreecommitdiffstats
path: root/assets/js/ed.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/ed.js')
-rw-r--r--assets/js/ed.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/assets/js/ed.js b/assets/js/ed.js
index 19b2c96..3a4b776 100644
--- a/assets/js/ed.js
+++ b/assets/js/ed.js
@@ -15,7 +15,9 @@ document.addEventListener('DOMContentLoaded', function () {
// Annotation support
const hypothesisContainer = document.querySelector('.hypothesis-container');
if (hypothesisContainer !== null) {
- hypothesisContainer.addEventListener('click', () => {
+ hypothesisContainer.addEventListener('click', (e) => {
+ e.preventDefault();
+
let script = document.createElement('script');
script.setAttribute('src', 'https://hypothes.is/embed.js');
script.type = 'text/javascript';