Update buil_json.html
Browse files- buil_json.html +2 -7
buil_json.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title
|
7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.9.2/jsoneditor.min.css" />
|
8 |
<style>
|
9 |
body {
|
@@ -70,10 +70,6 @@
|
|
70 |
<label for="file">Ссылка на файл:</label>
|
71 |
<input type="text" id="file" placeholder="Введите ссылку">
|
72 |
</div>
|
73 |
-
<div class="input-row">
|
74 |
-
<label for="autonext">Автопереключение плейлиста:</label>
|
75 |
-
<input type="checkbox" id="autonext">
|
76 |
-
</div>
|
77 |
<button id="addVideo">Add Video</button>
|
78 |
<button id="saveToClipboard">Save to Clipboard</button>
|
79 |
</div>
|
@@ -107,8 +103,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
107 |
});
|
108 |
document.getElementById('saveToClipboard').addEventListener('click', function() {
|
109 |
const json = editor.get();
|
110 |
-
const
|
111 |
-
const jsonString = JSON.stringify(json) + (autonext ? ', "autonext":1' : '');
|
112 |
navigator.clipboard.writeText(jsonString).then(function() {
|
113 |
alert('JSON saved to clipboard!');
|
114 |
}, function(err) {
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Video List Editor</title>
|
7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.9.2/jsoneditor.min.css" />
|
8 |
<style>
|
9 |
body {
|
|
|
70 |
<label for="file">Ссылка на файл:</label>
|
71 |
<input type="text" id="file" placeholder="Введите ссылку">
|
72 |
</div>
|
|
|
|
|
|
|
|
|
73 |
<button id="addVideo">Add Video</button>
|
74 |
<button id="saveToClipboard">Save to Clipboard</button>
|
75 |
</div>
|
|
|
103 |
});
|
104 |
document.getElementById('saveToClipboard').addEventListener('click', function() {
|
105 |
const json = editor.get();
|
106 |
+
const jsonString = JSON.stringify(json); // Убираем параметры отступов
|
|
|
107 |
navigator.clipboard.writeText(jsonString).then(function() {
|
108 |
alert('JSON saved to clipboard!');
|
109 |
}, function(err) {
|