datacipen commited on
Commit
f45f8f8
·
verified ·
1 Parent(s): cb0ac9a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -0
main.py CHANGED
@@ -207,6 +207,13 @@ async def on_message(message: cl.Message):
207
  }
208
 
209
  doSomething() {
 
 
 
 
 
 
 
210
  console.log(this.name);
211
  }
212
  }''')
 
207
  }
208
 
209
  doSomething() {
210
+ var parentElement = document.getElementsByClassName('css-oa138a');
211
+ var theFirstChild = parentElement.firstChild;
212
+ var newElement = document.createElement('div');
213
+ newElement.setAttribute('class', 'MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-standardInfo MuiAlert-standard css-179rm25');
214
+ newElement.setAttribute('role', 'info');
215
+ newElement.innerHTML = '<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1cw4hi4" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="InfoOutlinedIcon"><path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"></path></svg>' + this.name;
216
+ parentElement.insertBefore(newElement, theFirstChild);
217
  console.log(this.name);
218
  }
219
  }''')