GPTfree api commited on
Commit
77e2ea7
·
verified ·
1 Parent(s): 6ff9e57

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -1
index.html CHANGED
@@ -1,3 +1,17 @@
1
  <script>
2
- window.close();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  </script>
 
1
  <script>
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // 履歴があるか確認
4
+ if (window.history.length > 1) {
5
+ // 履歴がある場合はGoogleにリダイレクト
6
+ location.replace('https://google.com');
7
+ } else {
8
+ // 履歴がない場合はwindow.closeを試行
9
+ if (window.close) {
10
+ window.close();
11
+ } else {
12
+ // 万一のためリダイレクト
13
+ location.replace('https://google.com');
14
+ }
15
+ }
16
+ });
17
  </script>