cocoat commited on
Commit
4577771
·
verified ·
1 Parent(s): 219ba52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -532,8 +532,8 @@ window.addEventListener('load', () => {
532
  const svg = document.querySelector('svg.svelte-zyxd38 g');
533
  // SVGが存在しない場合、ローダーを非表示にする
534
  if (!svg) {
535
- if (customLoader) {
536
- customLoader.style.display = 'none';
537
  }
538
  return;
539
  }
@@ -546,7 +546,7 @@ window.addEventListener('load', () => {
546
  if (component25) {
547
  // カスタムローダーのHTML
548
  const loaderHTML = `
549
- <div id="custom-loader">
550
  <div class="loading-text">
551
  <span style="animation-delay:0s">i</span>
552
  <span style="animation-delay:0.1s">n</span>
@@ -564,6 +564,10 @@ window.addEventListener('load', () => {
564
  </div>
565
  `;
566
  component25.insertAdjacentHTML('beforeend', loaderHTML);
 
 
 
 
567
  }
568
 
569
  });
 
532
  const svg = document.querySelector('svg.svelte-zyxd38 g');
533
  // SVGが存在しない場合、ローダーを非表示にする
534
  if (!svg) {
535
+ if (document.getElementById('custom-loader')) {
536
+ document.getElementById('custom-loader').style.display = 'none';
537
  }
538
  return;
539
  }
 
546
  if (component25) {
547
  // カスタムローダーのHTML
548
  const loaderHTML = `
549
+ <div id="custom-loader" style="display: none;">
550
  <div class="loading-text">
551
  <span style="animation-delay:0s">i</span>
552
  <span style="animation-delay:0.1s">n</span>
 
564
  </div>
565
  `;
566
  component25.insertAdjacentHTML('beforeend', loaderHTML);
567
+ // SVGのg要素が存在する場合、ローダーを表示する
568
+ if (svg && customLoader) {
569
+ customLoader.style.display = 'block';
570
+ }
571
  }
572
 
573
  });