lalashechka commited on
Commit
107b0c2
1 Parent(s): 8d1238b

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +23 -9
index.html CHANGED
@@ -31,16 +31,30 @@ button#component-16 {
31
  <gradio-app src="https://doevent-pasd.hf.space"></gradio-app>
32
 
33
  <script>
34
- const imgSrc = "http://localhost:7860/file=/tmp/gradio/85f0a75404f6d0ad5e6757284382fd4e388e091f/frog.png";
35
- const newSrc = "https://myneuralnetworks.ru/static/img/shark.png";
36
-
37
- document.querySelectorAll('img').forEach(img => {
38
- if (img.src === imgSrc) {
39
- img.src = newSrc;
40
- }
41
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  </script>
43
-
44
  <script>
45
  const targetNode4135 = document.body; // или другой родительский элемент
46
  const config4135 = { childList: true, subtree: true };
 
31
  <gradio-app src="https://doevent-pasd.hf.space"></gradio-app>
32
 
33
  <script>
34
+ const targetNode41354 = document.body; // или другой родительский элемент
35
+ const config41354 = { childList: true, subtree: true };
36
+ const callback41354 = function(mutationsList, observer) {
37
+ for(let mutation of mutationsList) {
38
+ if (mutation.type === 'childList') {
39
+ const grApp41324 = document.getElementById('ga33');
40
+ const targetDiv41354 = grApp41324.querySelector('#component-5');
41
+
42
+ const imgSrc = "http://localhost:7860/file=/tmp/gradio/85f0a75404f6d0ad5e6757284382fd4e388e091f/frog.png";
43
+ const newSrc = "https://myneuralnetworks.ru/static/img/shark.png";
44
+
45
+ targetDiv41354.querySelectorAll('img').forEach(img => {
46
+ if (img.src === imgSrc) {
47
+ img.src = newSrc;
48
+ }
49
+ });
50
+ observer.disconnect(); // Останавливаем наблюдение после изменения
51
+ }
52
+ }
53
+ };
54
+ const observer41354 = new MutationObserver(callback41354);
55
+ observer41354.observe(targetNode41354, config41354);
56
  </script>
57
+
58
  <script>
59
  const targetNode4135 = document.body; // или другой родительский элемент
60
  const config4135 = { childList: true, subtree: true };