diff --git a/assets/js/transcript.js b/assets/js/transcript.js index 7f6332fa9..5c300c3a0 100644 --- a/assets/js/transcript.js +++ b/assets/js/transcript.js @@ -1,5 +1,5 @@ document.addEventListener('DOMContentLoaded', function () { - const pdfPath = '/assets/pdfs/smith.pdf'; + const pdfPath = '/assets/pdfs/smith.pdf'; // Use absolute path to ensure correctness console.log('PDF Path:', pdfPath); // Log to verify the path const pdfContainer = document.getElementById('pdf-container'); @@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', function () { fallbackMessage.className = 'text-muted'; fallbackMessage.innerHTML = ` Your browser does not support PDFs. Please - download the PDF to view it. + download the PDF to view it. `; pdfObject.appendChild(fallbackMessage); pdfContainer.appendChild(pdfObject); @@ -31,7 +31,8 @@ document.addEventListener('DOMContentLoaded', function () { const downloadButton = document.createElement('a'); downloadButton.href = pdfPath; downloadButton.className = 'btn btn-primary'; - downloadButton.textContent = 'View PDF'; + downloadButton.textContent = 'Download PDF'; + downloadButton.setAttribute('download', 'smith.pdf'); // Add download attribute to force download pdfContainer.appendChild(downloadButton); } }); \ No newline at end of file