diff --git a/AUTHORS b/AUTHORS index 0d5c84b..efd9552 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,6 +2,7 @@ pdf2htmlEX is created and maintained by Lu Wang Contributors: (alphabetical order) +Aamir Adnan Chris Cinelli Daniel Bonniot de Ruisselet Deepak diff --git a/share/pdf2htmlEX.js.in b/share/pdf2htmlEX.js.in index 636c94a..ae6a688 100644 --- a/share/pdf2htmlEX.js.in +++ b/share/pdf2htmlEX.js.in @@ -361,10 +361,13 @@ Viewer.prototype = { if (url) { this.pages_loading[idx] = true; // set semaphore - // add a copy of the loading indicator - var new_loading_indicator = this.loading_indicator.cloneNode(); - new_loading_indicator.classList.add('active'); - cur_page_ele.appendChild(new_loading_indicator); + // add a copy of the loading indicator if not already present + var new_loading_indicator = cur_page_ele.getElementsByClassName(this.config['loading_indicator_cls'])[0]; + if (typeof new_loading_indicator === 'undefined'){ + new_loading_indicator = this.loading_indicator.cloneNode(true); + new_loading_indicator.classList.add('active'); + cur_page_ele.appendChild(new_loading_indicator); + } // load data {