From 1f388391278dadf2cae977141a432aa2f39d8614 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Mon, 17 Mar 2025 20:04:41 +0800 Subject: Remove hypothesis for annotation support. --- assets/js/ed.js | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'assets/js') diff --git a/assets/js/ed.js b/assets/js/ed.js index b4ba4d6..fb75c94 100644 --- a/assets/js/ed.js +++ b/assets/js/ed.js @@ -13,26 +13,6 @@ function setupBackToTop() { } } -// Annotation support -function setupHypothes() { - const hypothesisContainer = document.querySelector('.hypothesis-container'); - if (hypothesisContainer !== null) { - hypothesisContainer.addEventListener('click', e => { - e.preventDefault(); - - let script = document.createElement('script'); - script.setAttribute('src', 'https://cdn.hypothes.is/hypothesis'); - script.type = 'text/javascript'; - document.getElementsByTagName('head')[0].appendChild(script); - }); - } - - const hypothesisLink = document.querySelector('#hypothesis-link'); - if (hypothesisLink !== null) { - hypothesisContainer.addEventListener('click', e => e.preventDefault()); - } -} - document.addEventListener('DOMContentLoaded', () => { setupBackToTop(); setupHypothes(); -- cgit v1.2.3