layoutIsDone.js 691 B

123456789101112131415161718
  1. // alerte que le rendu est fini et actualise l'ui
  2. if (debug) console.log('%cBook is ready', boldLogging);
  3. (function() {
  4. let loading = document.querySelector('.loading');
  5. loading.innerHTML = 'Le livre est prêt';
  6. let pageAmount = document.querySelectorAll('.pagedjs_page').length;
  7. let pageAmountContainer = document.querySelector('.pageAmount');
  8. pageAmountContainer.style.display = 'block';
  9. pageAmountContainer.innerText = `${pageAmount} pages`;
  10. let jumpToPage = document.querySelector('.jumpToPage');
  11. jumpToPage.style.display = 'block';
  12. let pagesToDisplay = document.querySelector('.pagesToDisplay');
  13. pagesToDisplay.style.display = 'block';
  14. })();