From 91ef13bc5b7ef5d104224afcc644bc6931ac75f2 Mon Sep 17 00:00:00 2001 From: Anar Date: Wed, 19 Aug 2026 14:21:09 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=81=D0=BA=D0=B0=D1=87=D0=B8=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20pptx=20=D1=81=20=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE-=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 824f7f7..fa15f96 100644 --- a/index.html +++ b/index.html @@ -167,13 +167,18 @@ document.addEventListener("keydown", function (e) { if (e.key === "ArrowLeft") go(-1); }); function downloadPptx() { - if (typeof PptxGenJS === 'undefined') { - alert('Загрузка библиотеки... Повторите нажатие через 3 секунды'); - var script = document.createElement('script'); - script.src = 'https://cdn.jsdelivr.net/npm/pptxgenjs@3.12.0/dist/pptxgen.min.js'; - document.head.appendChild(script); + if (typeof PptxGenJS !== 'undefined') { + createPptx(); return; } + var script = document.createElement('script'); + script.src = 'https://cdn.jsdelivr.net/npm/pptxgenjs@3.12.0/dist/pptxgen.min.js'; + script.onload = function() { + createPptx(); + }; + document.head.appendChild(script); +} +function createPptx() { var p = new PptxGenJS(); p.defineLayout({ name: "W", width: 13.33, height: 7.5 }); p.layout = "W";