Spaces:
Running
Running
GPTfree api
commited on
Update index.html
Browse files- index.html +15 -1
index.html
CHANGED
@@ -1,3 +1,17 @@
|
|
1 |
<script>
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|