| 1 |
/* PDF Embed – frontend.js |
| 2 |
The PDF viewer is a native <iframe> — no JavaScript is required. |
| 3 |
This file is reserved for future enhancements (e.g., lazy-load iframes, |
| 4 |
PDF.js integration, or responsive height adjustments). */ |
| 5 |
(function () { |
| 6 |
'use strict'; |
| 7 |
|
| 8 |
/* Optional: make iframes respect aspect ratio on resize */ |
| 9 |
function resizePdfViewers() { |
| 10 |
document.querySelectorAll('.bkbg-pdf-viewer').forEach(function (viewer) { |
| 11 |
var iframe = viewer.querySelector('.bkbg-pdf-iframe'); |
| 12 |
if (!iframe) return; |
| 13 |
/* height is set via inline style — no action needed |
| 14 |
unless the user wants responsive height in the future */ |
| 15 |
}); |
| 16 |
} |
| 17 |
|
| 18 |
document.addEventListener('DOMContentLoaded', resizePdfViewers); |
| 19 |
})(); |
| 20 |
|