diff --git a/contents.js b/contents.js index 9f4630e..6c12f47 100644 --- a/contents.js +++ b/contents.js @@ -2,8 +2,18 @@ const reference = document.getElementById("reference"); const contributionsList = document.getElementById("contributions"); +const pagedjs = document.createElement('script') +pagedjs.src = 'https://unpkg.com/pagedjs/dist/paged.polyfill.js' - function fetchContents(){ + +window.addEventListener('load',()=>{ + fetchContents() + document.getElementsByTagName('head')[0].appendChild(pagedjs) +}) + + + +function fetchContents(){ fetch("https://hub.xpub.nl/soupboat/atlas-api/contributions") .then((response) => response.json()) .then((data) => populateContributions(data)); diff --git a/index.html b/index.html index 8f9d255..26fe4c3 100644 --- a/index.html +++ b/index.html @@ -5,11 +5,11 @@ - - --> - - + + +