function addFlipbookStyle() { if (!document.getElementById('flipbookStyleSheet')) { const flipbookStyleSheet = document.createElement('link'); flipbookStyleSheet.href = 'https://katalog.buecherbaukasten.de/wp-content/plugins/dflip/assets/css/dflip.min.css?ver=2.0.65'; flipbookStyleSheet.rel = 'stylesheet'; flipbookStyleSheet.media = 'all'; flipbookStyleSheet.id = 'flipbookStyleSheet'; // Append the link element to the head section of the HTML document document.head.appendChild(flipbookStyleSheet); } } // Create script element for dflip shortcode function addFlipbookConfigs() { const dflipShortcodeScript = document.createElement('script'); dflipShortcodeScript.type = 'application/javascript'; dflipShortcodeScript.innerHTML = `window.option_df_87 = { outline: [], forceFit: 'true', autoEnableOutline: 'false', autoEnableThumbnail: 'false', overwritePDFOutline: 'false', direction: '1', pageSize: '0', source: 'https://katalog.buecherbaukasten.de/wp-content/uploads/2024/06/Buchhandlung-Kafka-Co-Fj24-1.pdf', wpOptions: 'true', }; if (window.DFLIP && window.DFLIP.parseBooks) { window.DFLIP.parseBooks(); }`; // Append the script element to the body section of the HTML document document.body.appendChild(dflipShortcodeScript); } // Create script element for jQuery function addFlipbookJQuery() { if (!window.jQuery) { const jqueryScript = document.createElement('script'); jqueryScript.src = 'https://code.jquery.com/jquery-3.6.4.min.js'; // 'https://katalog.buecherbaukasten.de/wp-includes/js/jquery/jquery.min.js?ver=3.6.3'; jqueryScript.id = 'dflip-jquery-js'; // Append the script element to the body section of the HTML document document.body.appendChild(jqueryScript); } } function addFlipbookScript() { if (window.jQuery) { // Create script element for dflip const dflipScript = document.createElement('script'); dflipScript.src = 'https://katalog.buecherbaukasten.de/wp-content/plugins/dflip/assets/js/dflip.min.js?ver=2.0.65'; dflipScript.id = 'dflip-script-js'; // Append the script element to the body section of the HTML document document.body.appendChild(dflipScript); } else { var dflipjQeury = document.getElementById('dflip-jquery-js'); if (dflipjQeury) { dflipjQeury.addEventListener('load', () => { // Create script element for dflip const dflipScript = document.createElement('script'); dflipScript.src = 'https://katalog.buecherbaukasten.de/wp-content/plugins/dflip/assets/js/dflip.min.js?ver=2.0.65'; dflipScript.id = 'dflip-script-js'; // Append the script element to the body section of the HTML document document.body.appendChild(dflipScript); }); } } } function addFlipBookDiv() { const div = document.createElement('div'); div.classList.add('_df_thumb'); div.id = 'df_87'; div.dataset.title = 'Buchhandlung Kafka & Co Fj24'; div.setAttribute('_slug', '87'); div.setAttribute('wpoptions', 'true'); div.setAttribute('thumb', 'https://katalog.buecherbaukasten.de/wp-content/uploads/2024/06/Buchhandlung-Kafka-Co-Fj24.png'); div.setAttribute('thumbtype', 'bg'); div.innerHTML = 'Buchhandlung Kafka & Co Fj24'; // Get the script tag element const scriptTag = document.currentScript; // Add the div before the script element scriptTag.parentNode.insertBefore(div, scriptTag.nextSibling); } addFlipbookStyle(); addFlipbookConfigs(); addFlipbookJQuery(); addFlipbookScript(); addFlipBookDiv();