Update js/sav_html.js
Browse files- js/sav_html.js +2 -7
js/sav_html.js
CHANGED
|
@@ -3,7 +3,7 @@ function exportHtml() {
|
|
| 3 |
const cssCode = editor.getCss();
|
| 4 |
const jsCode = editor.getJs();
|
| 5 |
|
| 6 |
-
// Собираем выбранные скрипты
|
| 7 |
const selectedScripts = [];
|
| 8 |
if (document.getElementById('script1-checkbox').checked) {
|
| 9 |
selectedScripts.push(document.getElementById('script1-checkbox').value);
|
|
@@ -18,11 +18,6 @@ function exportHtml() {
|
|
| 18 |
// Собираем дополнительные скрипты
|
| 19 |
const additionalScripts = selectedScripts.map(script => `<script src="${script}"><\/script>`).join('');
|
| 20 |
|
| 21 |
-
// Собираем собственные скрипты, которые вы написали
|
| 22 |
-
const customScripts = `
|
| 23 |
-
${jsCode}
|
| 24 |
-
`;
|
| 25 |
-
|
| 26 |
// Объединение всего в один HTML-файл
|
| 27 |
const fullHtml = `
|
| 28 |
<!DOCTYPE html>
|
|
@@ -32,8 +27,8 @@ function exportHtml() {
|
|
| 32 |
</head>
|
| 33 |
<body>
|
| 34 |
${htmlCode}
|
|
|
|
| 35 |
${additionalScripts}
|
| 36 |
-
${customScripts}
|
| 37 |
</body>
|
| 38 |
</html>
|
| 39 |
`;
|
|
|
|
| 3 |
const cssCode = editor.getCss();
|
| 4 |
const jsCode = editor.getJs();
|
| 5 |
|
| 6 |
+
// Собираем выбранные скрипты
|
| 7 |
const selectedScripts = [];
|
| 8 |
if (document.getElementById('script1-checkbox').checked) {
|
| 9 |
selectedScripts.push(document.getElementById('script1-checkbox').value);
|
|
|
|
| 18 |
// Собираем дополнительные скрипты
|
| 19 |
const additionalScripts = selectedScripts.map(script => `<script src="${script}"><\/script>`).join('');
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
// Объединение всего в один HTML-файл
|
| 22 |
const fullHtml = `
|
| 23 |
<!DOCTYPE html>
|
|
|
|
| 27 |
</head>
|
| 28 |
<body>
|
| 29 |
${htmlCode}
|
| 30 |
+
<script>${jsCode}<\/script>
|
| 31 |
${additionalScripts}
|
|
|
|
| 32 |
</body>
|
| 33 |
</html>
|
| 34 |
`;
|