diff --git a/ipwb/assets/reconstructive-banner.js b/ipwb/assets/reconstructive-banner.js index a67f6cf..edc0efd 100644 --- a/ipwb/assets/reconstructive-banner.js +++ b/ipwb/assets/reconstructive-banner.js @@ -291,6 +291,8 @@ class ReconstructiveBanner extends HTMLElement {
+ test data here lorem + On open, send Ajax request to ${this.timemapUrit}
@@ -326,6 +328,12 @@ class ReconstructiveBanner extends HTMLElement { wrapper.classList.replace('fab', 'expanded'); wrapper.style.removeProperty('top'); wrapper.style.removeProperty('left'); + console.log(`TODO: perform AJAX request to ${this.timemapUrit}`) + fetch(this.timemapUrit) + .then(response => response.json()) // even though we can only get link-format or cdxj TMs for now + .then(data => console.log(data)).catch(()=>{ + // Exception occurred, do something + }) }; this.shadow.getElementById('collapse').onclick = e => { e.preventDefault(); diff --git a/ipwb/assets/reconstructive.js b/ipwb/assets/reconstructive.js index 4f5565f..f29729d 100644 --- a/ipwb/assets/reconstructive.js +++ b/ipwb/assets/reconstructive.js @@ -202,7 +202,8 @@ class Reconstructive { prev-urim="${rels.prev && rels.prev.href || ''}" prev-datetime="${rels.prev && rels.prev.datetime || ''}" next-urim="${rels.next && rels.next.href || ''}" - next-datetime="${rels.next && rels.next.datetime || ''}"> + next-datetime="${rels.next && rels.next.datetime || ''}" + timemap-urit="${rels.timemap && rels.timemap.href || ''}"> `; }