Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -522,35 +522,28 @@ window.addEventListener('load', () => {
|
|
| 522 |
// 一度挿入したら再挿入しない
|
| 523 |
if (svg.querySelector('foreignObject#custom-loader-fo')) return;
|
| 524 |
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
<
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
<span style="animation-delay:0.4s">r</span>
|
| 543 |
-
<span style="animation-delay:0.5s">o</span>
|
| 544 |
-
<span style="animation-delay:0.6s">g</span>
|
| 545 |
-
<span style="animation-delay:0.7s">r</span>
|
| 546 |
-
<span style="animation-delay:0.8s">e</span>
|
| 547 |
-
<span style="animation-delay:0.9s">s</span>
|
| 548 |
-
<span style="animation-delay:1.0s">s</span>
|
| 549 |
-
<img src="https://huggingface.co/spaces/cocoat/Re.cocoamixXL3/resolve/main/icon.png" width="32" height="32" />
|
| 550 |
-
</div>
|
| 551 |
</div>
|
| 552 |
-
|
| 553 |
-
|
|
|
|
|
|
|
| 554 |
svg.appendChild(fo);
|
| 555 |
});
|
| 556 |
observer.observe(document.body, { childList: true, subtree: true });
|
|
|
|
| 522 |
// 一度挿入したら再挿入しない
|
| 523 |
if (svg.querySelector('foreignObject#custom-loader-fo')) return;
|
| 524 |
|
| 525 |
+
if (component25) { // ★ 要素が存在する場合のみ追加
|
| 526 |
+
// カスタムローダーのHTML
|
| 527 |
+
const loaderHTML = `
|
| 528 |
+
<div id="custom-loader">
|
| 529 |
+
<div class="loading-text">
|
| 530 |
+
<span style="animation-delay:0s">i</span>
|
| 531 |
+
<span style="animation-delay:0.1s">n</span>
|
| 532 |
+
<span style="animation-delay:0.2s"> </span>
|
| 533 |
+
<span style="animation-delay:0.3s">p</span>
|
| 534 |
+
<span style="animation-delay:0.4s">r</span>
|
| 535 |
+
<span style="animation-delay:0.5s">o</span>
|
| 536 |
+
<span style="animation-delay:0.6s">g</span>
|
| 537 |
+
<span style="animation-delay:0.7s">r</span>
|
| 538 |
+
<span style="animation-delay:0.8s">e</span>
|
| 539 |
+
<span style="animation-delay:0.9s">s</span>
|
| 540 |
+
<span style="animation-delay:1.0s">s</span>
|
| 541 |
+
<img src="[https://huggingface.co/spaces/cocoat/Re.cocoamixXL3/resolve/main/icon.png](https://huggingface.co/spaces/cocoat/Re.cocoamixXL3/resolve/main/icon.png)" width="32" height="32" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 542 |
</div>
|
| 543 |
+
</div>
|
| 544 |
+
`;
|
| 545 |
+
component25.insertAdjacentHTML('beforeend', loaderHTML);
|
| 546 |
+
}
|
| 547 |
svg.appendChild(fo);
|
| 548 |
});
|
| 549 |
observer.observe(document.body, { childList: true, subtree: true });
|