Update pages.html
Browse files- pages.html +7 -3
pages.html
CHANGED
@@ -713,11 +713,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
713 |
const editor = grapesjs.editors[0]; // Предполагается, что у вас есть только один редактор
|
714 |
const htmlContent = editor.getHtml();
|
715 |
const cssContent = editor.getCss();
|
716 |
-
|
717 |
// Загружаем библиотеки
|
718 |
await loadVKBridge();
|
719 |
await loadOpenAPI();
|
720 |
-
|
721 |
const fullHtmlContent = `
|
722 |
<!DOCTYPE html>
|
723 |
<html lang="en">
|
@@ -732,7 +730,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
732 |
</body>
|
733 |
</html>
|
734 |
`;
|
735 |
-
|
736 |
const blob = new Blob([fullHtmlContent], { type: 'text/html' });
|
737 |
const link = document.createElement('a');
|
738 |
link.href = URL.createObjectURL(blob);
|
@@ -745,10 +742,17 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
745 |
// Функция для показа/скрытия приложения
|
746 |
document.getElementById('toggleAppBtn').addEventListener('click', function() {
|
747 |
const app = document.getElementById('gjs');
|
|
|
|
|
|
|
|
|
|
|
748 |
if (app.style.left === '0px' || app.style.left === '') {
|
749 |
app.style.left = '-15%'; // Скрыть приложение
|
|
|
750 |
} else {
|
751 |
app.style.left = '0'; // Показать приложение
|
|
|
752 |
}
|
753 |
});
|
754 |
});
|
|
|
713 |
const editor = grapesjs.editors[0]; // Предполагается, что у вас есть только один редактор
|
714 |
const htmlContent = editor.getHtml();
|
715 |
const cssContent = editor.getCss();
|
|
|
716 |
// Загружаем библиотеки
|
717 |
await loadVKBridge();
|
718 |
await loadOpenAPI();
|
|
|
719 |
const fullHtmlContent = `
|
720 |
<!DOCTYPE html>
|
721 |
<html lang="en">
|
|
|
730 |
</body>
|
731 |
</html>
|
732 |
`;
|
|
|
733 |
const blob = new Blob([fullHtmlContent], { type: 'text/html' });
|
734 |
const link = document.createElement('a');
|
735 |
link.href = URL.createObjectURL(blob);
|
|
|
742 |
// Функция для показа/скрытия приложения
|
743 |
document.getElementById('toggleAppBtn').addEventListener('click', function() {
|
744 |
const app = document.getElementById('gjs');
|
745 |
+
if (!app) {
|
746 |
+
console.error('Элемент с идентификатором gjs не найден');
|
747 |
+
return;
|
748 |
+
}
|
749 |
+
console.log('Элемент gjs найден');
|
750 |
if (app.style.left === '0px' || app.style.left === '') {
|
751 |
app.style.left = '-15%'; // Скрыть приложение
|
752 |
+
console.log('Приложение скрыто');
|
753 |
} else {
|
754 |
app.style.left = '0'; // Показать приложение
|
755 |
+
console.log('Приложение показано');
|
756 |
}
|
757 |
});
|
758 |
});
|