PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.11
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.11
2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / blocks / pdf-embed / frontend.js

frontend.js in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.11, at blocks/pdf-embed/frontend.js

20 lines 782 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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