soiz1 commited on
Commit
900514d
·
1 Parent(s): f045ff4

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +105 -7
index.html CHANGED
@@ -19,14 +19,112 @@ document.addEventListener("DOMContentLoaded", () => {
19
  }
20
  });
21
  </script>
22
- <script async data-id="101489234" src="//static.getclicky.com/js"></script>
23
  <script>
24
- !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init Ie Ts Ms Ee Es Rs capture Ge calculateEventProperties Os register register_once register_for_session unregister unregister_for_session js getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSurveysLoaded onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey canRenderSurveyAsync identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty Ds Fs createPersonProfile Ls Ps opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing Cs debug I As getPageViewId captureTraceFeedback captureTraceMetric".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
25
- posthog.init('phc_3VymvjpfBnTsU1JIcPm0Zjx9jFc3iyGHn6yGEi7GyxG', {
26
- api_host: 'https://us.i.posthog.com',
27
- defaults: '2025-05-24',
28
- person_profiles: 'identified_only', // or 'always' to create profiles for anonymous users as well
29
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  </script>
31
  <link rel="icon" type="image/svg+xml" href='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgbGFuZz0iamEiPjxkZWZzPiA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWQxIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+IDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzNDc0ZWIiIC8+IDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzM0YThlYiIgLz4gPC9saW5lYXJHcmFkaWVudD4gPC9kZWZzPiA8IS0tIOWQhOS6uuWbvuWkjeS9nOWumuS7tuWkjeaWsOWIl+OBjOaWsOWIl+OBq+OBhOOBq+OBvuOBq+OCi+OCieWbvuWkjeOBjOOCjOOCieOCk+ODq+ODvOODrOODs+ODg+OCiwotLT4gPHBvbHlnb24gcG9pbnRzPSI1MCw1MCA1MCwxNTAgMTUwLDEwMCIgZmlsbD0idXJsKCNncmFkMSkiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgLz48L3N2Zz4=' />
32
  <meta charset="UTF-8">
 
19
  }
20
  });
21
  </script>
 
22
  <script>
23
+ (function () {
24
+ const UPDATE_URL = '/update.txt';
25
+ const CHECK_INTERVAL_MS = 30000;
26
+ let initialVersion = null;
27
+
28
+ // CSSを挿入
29
+ const style = document.createElement('style');
30
+ style.textContent = `
31
+ #update-popup {
32
+ position: fixed;
33
+ top: 20px;
34
+ right: 20px;
35
+ background: #fff3cd;
36
+ color: #856404;
37
+ border: 1px solid #ffeeba;
38
+ border-radius: 8px;
39
+ padding: 20px 16px 16px 16px;
40
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
41
+ display: none;
42
+ z-index: 1000;
43
+ font-family: sans-serif;
44
+ width: 240px;
45
+ }
46
+
47
+ #update-popup-close {
48
+ position: absolute;
49
+ top: 6px;
50
+ right: 8px;
51
+ background: none;
52
+ border: none;
53
+ font-size: 16px;
54
+ font-weight: bold;
55
+ color: #856404;
56
+ cursor: pointer;
57
+ }
58
+
59
+ #update-popup-close:hover {
60
+ color: #000;
61
+ }
62
+
63
+ #update-popup button.reload {
64
+ margin-top: 10px;
65
+ padding: 6px 12px;
66
+ border: none;
67
+ background-color: #ffc107;
68
+ color: #000;
69
+ cursor: pointer;
70
+ border-radius: 4px;
71
+ width: 100%;
72
+ }
73
+
74
+ #update-popup button.reload:hover {
75
+ background-color: #e0a800;
76
+ }
77
+ `;
78
+ document.head.appendChild(style);
79
+
80
+ // ポップアップ要素を作成
81
+ const popup = document.createElement('div');
82
+ popup.id = 'update-popup';
83
+ popup.innerHTML = `
84
+ <button id="update-popup-close" aria-label="閉じる">×</button>
85
+ <p>更新が必要です。</p>
86
+ <button class="reload">再読み込み</button>
87
+ `;
88
+ document.body.appendChild(popup);
89
+
90
+ // 閉じるボタン機能
91
+ document.getElementById('update-popup-close').addEventListener('click', () => {
92
+ popup.style.display = 'none';
93
+ });
94
+
95
+ // 再読み込みボタン機能
96
+ popup.querySelector('.reload').addEventListener('click', () => {
97
+ location.reload();
98
+ });
99
+
100
+ // バージョン取得関数
101
+ async function fetchVersion() {
102
+ try {
103
+ const res = await fetch(UPDATE_URL + '?t=' + Date.now());
104
+ if (res.ok) return await res.text();
105
+ } catch (err) {
106
+ console.warn('update.txt の取得に失敗:', err);
107
+ }
108
+ return null;
109
+ }
110
+
111
+ // 更新チェック関数
112
+ async function checkForUpdate() {
113
+ const latest = await fetchVersion();
114
+ if (initialVersion && latest && latest !== initialVersion) {
115
+ popup.style.display = 'block';
116
+ }
117
+ }
118
+
119
+ // 初期バージョン取得 → チェック開始
120
+ (async () => {
121
+ initialVersion = await fetchVersion();
122
+ if (initialVersion) {
123
+ setInterval(checkForUpdate, CHECK_INTERVAL_MS);
124
+ }
125
+ })();
126
+ })();
127
+
128
  </script>
129
  <link rel="icon" type="image/svg+xml" href='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgbGFuZz0iamEiPjxkZWZzPiA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWQxIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+IDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzNDc0ZWIiIC8+IDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzM0YThlYiIgLz4gPC9saW5lYXJHcmFkaWVudD4gPC9kZWZzPiA8IS0tIOWQhOS6uuWbvuWkjeS9nOWumuS7tuWkjeaWsOWIl+OBjOaWsOWIl+OBq+OBhOOBq+OBvuOBq+OCi+OCieWbvuWkjeOBjOOCjOOCieOCk+ODq+ODvOODrOODs+ODg+OCiwotLT4gPHBvbHlnb24gcG9pbnRzPSI1MCw1MCA1MCwxNTAgMTUwLDEwMCIgZmlsbD0idXJsKCNncmFkMSkiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgLz48L3N2Zz4=' />
130
  <meta charset="UTF-8">