ginipick commited on
Commit
4bbcfe1
Β·
verified Β·
1 Parent(s): acfd54e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +10 -16
index.html CHANGED
@@ -215,8 +215,6 @@
215
  </footer>
216
 
217
  <!-- β˜… SiteAgent μ‚½μž… (단 ν•œ 쀄) β˜… -->
218
- <script src="https://ginigen-ai-siteagent.hf.space/secure-pageagent.extend.js"></script>
219
-
220
 
221
  <div id="sa-launcher" style="position:fixed;bottom:32px;right:32px;z-index:2147483647;">
222
  <button id="sa-open-btn"
@@ -233,22 +231,18 @@
233
  </div>
234
  </div>
235
  <script>
 
236
  document.getElementById('sa-open-btn').addEventListener('click', function(){
237
- // SA μŠ€ν¬λ¦½νŠΈκ°€ λ‘œλ“œλ  λ•ŒκΉŒμ§€ 폴링
238
- var tries = 0;
239
- function tryOpen(){
240
- if(window.__sa_panel_open){
241
- window.__sa_panel_open();
242
- } else if(document.getElementById('__sa_F')){
243
- document.getElementById('__sa_F').click();
244
- } else if(tries < 20){
245
- tries++;
246
- setTimeout(tryOpen, 300);
247
- } else {
248
- alert('SiteAgent 슀크립트 λ‘œλ“œ μ€‘μž…λ‹ˆλ‹€. μž μ‹œ ν›„ λ‹€μ‹œ ν΄λ¦­ν•˜μ„Έμš”.');
249
- }
250
  }
251
- tryOpen();
 
 
 
 
 
252
  });
253
  </script>
254
  </body>
 
215
  </footer>
216
 
217
  <!-- β˜… SiteAgent μ‚½μž… (단 ν•œ 쀄) β˜… -->
 
 
218
 
219
  <div id="sa-launcher" style="position:fixed;bottom:32px;right:32px;z-index:2147483647;">
220
  <button id="sa-open-btn"
 
231
  </div>
232
  </div>
233
  <script>
234
+ var _saLoaded = false;
235
  document.getElementById('sa-open-btn').addEventListener('click', function(){
236
+ if(_saLoaded){
237
+ if(window.__sa_panel_open) window.__sa_panel_open();
238
+ return;
 
 
 
 
 
 
 
 
 
 
239
  }
240
+ _saLoaded = true;
241
+ // λ²„νŠΌ 클릭 μ‹œμ μ— 슀크립트 동적 λ‘œλ“œ
242
+ // 슀크립트 끝에 openP()κ°€ μžˆμ–΄μ„œ λ‘œλ“œ μ™„λ£Œ μ‹œ μžλ™μœΌλ‘œ νŒ¨λ„μ΄ μ—΄λ¦Ό
243
+ var s = document.createElement('script');
244
+ s.src = 'https://ginigen-ai-siteagent.hf.space/secure-pageagent.extend.js?t=' + Date.now();
245
+ document.body.appendChild(s);
246
  });
247
  </script>
248
  </body>