Molbap HF Staff commited on
Commit
0023363
·
verified ·
1 Parent(s): c4774db

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +14 -3
index.html CHANGED
@@ -7989,10 +7989,21 @@
7989
  const addTabBtn = document.getElementById('add-tab-btn');
7990
 
7991
  // --- Example Code ---
7992
- const exampleCodeMain = document.getElementById("main-code").textContent;
7993
-
7994
- const exampleCodeDeps = document.getElementById("dependencies").textContent;
7995
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7996
 
7997
  // --- Tab Management ---
7998
  let tabCounter = 0;
 
7989
  const addTabBtn = document.getElementById('add-tab-btn');
7990
 
7991
  // --- Example Code ---
7992
+ // const exampleCodeMain = document.getElementById("main-code").textContent;
 
 
7993
 
7994
+ // const exampleCodeDeps = document.getElementById("dependencies").textContent;
7995
+ fetch("main_code.py")
7996
+ .then(res => res.text())
7997
+ .then(code => {
7998
+ const exampleCodeMain = code;
7999
+ // do something with the code
8000
+ });
8001
+ fetch("dependencies.py")
8002
+ .then(res => res.text())
8003
+ .then(code => {
8004
+ const exampleCodeDeps = code;
8005
+ // do something with the code
8006
+ });
8007
 
8008
  // --- Tab Management ---
8009
  let tabCounter = 0;