Update buil_json.html
Browse files- buil_json.html +1 -6
    	
        buil_json.html
    CHANGED
    
    | @@ -26,7 +26,6 @@ | |
| 26 |  | 
| 27 | 
             
              <script src="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.9.2/jsoneditor.min.js"></script>
         | 
| 28 | 
             
              <script>
         | 
| 29 | 
            -
             | 
| 30 | 
             
            document.addEventListener('DOMContentLoaded', function() {
         | 
| 31 | 
             
              const container = document.getElementById('jsoneditor');
         | 
| 32 | 
             
              const options = {
         | 
| @@ -37,10 +36,8 @@ document.addEventListener('DOMContentLoaded', function() { | |
| 37 | 
             
                }
         | 
| 38 | 
             
              };
         | 
| 39 | 
             
              const editor = new JSONEditor(container, options);
         | 
| 40 | 
            -
             | 
| 41 | 
             
              let videoList = [];
         | 
| 42 | 
             
              editor.set(videoList);
         | 
| 43 | 
            -
             | 
| 44 | 
             
              document.getElementById('addVideo').addEventListener('click', function() {
         | 
| 45 | 
             
                const title = document.getElementById('title').value;
         | 
| 46 | 
             
                const file = document.getElementById('file').value;
         | 
| @@ -53,10 +50,9 @@ document.addEventListener('DOMContentLoaded', function() { | |
| 53 | 
             
                  alert('Please fill in both title and file URL.');
         | 
| 54 | 
             
                }
         | 
| 55 | 
             
              });
         | 
| 56 | 
            -
             | 
| 57 | 
             
              document.getElementById('saveToClipboard').addEventListener('click', function() {
         | 
| 58 | 
             
                const json = editor.get();
         | 
| 59 | 
            -
                const jsonString = JSON.stringify(json | 
| 60 | 
             
                navigator.clipboard.writeText(jsonString).then(function() {
         | 
| 61 | 
             
                  alert('JSON saved to clipboard!');
         | 
| 62 | 
             
                }, function(err) {
         | 
| @@ -64,7 +60,6 @@ document.addEventListener('DOMContentLoaded', function() { | |
| 64 | 
             
                });
         | 
| 65 | 
             
              });
         | 
| 66 | 
             
            });
         | 
| 67 | 
            -
             | 
| 68 |  | 
| 69 | 
             
              </script>
         | 
| 70 | 
             
            </body>
         | 
|  | |
| 26 |  | 
| 27 | 
             
              <script src="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.9.2/jsoneditor.min.js"></script>
         | 
| 28 | 
             
              <script>
         | 
|  | |
| 29 | 
             
            document.addEventListener('DOMContentLoaded', function() {
         | 
| 30 | 
             
              const container = document.getElementById('jsoneditor');
         | 
| 31 | 
             
              const options = {
         | 
|  | |
| 36 | 
             
                }
         | 
| 37 | 
             
              };
         | 
| 38 | 
             
              const editor = new JSONEditor(container, options);
         | 
|  | |
| 39 | 
             
              let videoList = [];
         | 
| 40 | 
             
              editor.set(videoList);
         | 
|  | |
| 41 | 
             
              document.getElementById('addVideo').addEventListener('click', function() {
         | 
| 42 | 
             
                const title = document.getElementById('title').value;
         | 
| 43 | 
             
                const file = document.getElementById('file').value;
         | 
|  | |
| 50 | 
             
                  alert('Please fill in both title and file URL.');
         | 
| 51 | 
             
                }
         | 
| 52 | 
             
              });
         | 
|  | |
| 53 | 
             
              document.getElementById('saveToClipboard').addEventListener('click', function() {
         | 
| 54 | 
             
                const json = editor.get();
         | 
| 55 | 
            +
                const jsonString = JSON.stringify(json); // Убираем параметры отступов
         | 
| 56 | 
             
                navigator.clipboard.writeText(jsonString).then(function() {
         | 
| 57 | 
             
                  alert('JSON saved to clipboard!');
         | 
| 58 | 
             
                }, function(err) {
         | 
|  | |
| 60 | 
             
                });
         | 
| 61 | 
             
              });
         | 
| 62 | 
             
            });
         | 
|  | |
| 63 |  | 
| 64 | 
             
              </script>
         | 
| 65 | 
             
            </body>
         |