/** * @package EmbedPress * @author EmbedPress * @copyright Copyright (C) 2023 EmbedPress. All rights reserved. * @license GPLv2 or later * @since 1.7.0 */ let epGlobals = {}; (function ($) { 'use strict'; // function equivalent to jquery ready() function ready(fn) { if (document.readyState !== 'loading') { fn(); } else { document.addEventListener('DOMContentLoaded', fn); } } ready(function () { let option = { forceObject: true, }; let selector = document.querySelectorAll('.embedpress-embed-document-pdf'); if (selector.length) { selector.forEach((function (value, index, thisArg) { let id = value.dataset['emid']; let src = value.dataset['emsrc']; PDFObject.embed(src, "." + id, option); })); } if (typeof epGlobals.youtubeChannelGallery === 'function') { epGlobals.youtubeChannelGallery(); } }); /** * * Make embeds responsive so they don't overflow their container. */ /** * Add max-width & max-height to