Load pdf libs when needed (#1902)
* feat: only load pdf-lib when its used * feat: only load pdfjs when its used
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
</div>
|
||||
<th:block th:insert="~{fragments/footer.html :: footer}"></th:block>
|
||||
</div>
|
||||
<script type="module" th:src="@{'/pdfjs-legacy/pdf.mjs'}"></script>
|
||||
<script>
|
||||
const angleInput = document.getElementById("angleInput");
|
||||
const fileInput = document.getElementById("fileInput-input");
|
||||
@@ -58,7 +59,7 @@
|
||||
console.log("loading pdf");
|
||||
|
||||
document.querySelector("#editSection").style.display = "";
|
||||
|
||||
|
||||
const existingPreview = document.getElementById("pdf-preview");
|
||||
if (existingPreview) {
|
||||
existingPreview.remove();
|
||||
|
||||
Reference in New Issue
Block a user