-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
294 lines (285 loc) · 10.5 KB
/
index.html
File metadata and controls
294 lines (285 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html lang="ja" data-theme="light" prefix="og: https://ogp.me/ns#">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<meta name="keywords" content="ストップウォッチ,stopwatch,マイナス,minus" />
<meta
name="description"
content="マイナスの秒数から開始できるストップウォッチです。同時視聴配信のタイミング合わせなどにどうぞ。 Countdownable simple timer (stopwatch) for watchparty (or watchalong) streaming."
/>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-LN7KW2PYR4"
type="module"
></script>
<script async>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-LN7KW2PYR4");
</script>
<script>
const startTime = new Date();
window.addEventListener("unload", () => {
gtag("event", "page_unload", {
event_label: "unload",
value: Math.floor((new Date() - startTime) / 1000),
});
});
</script>
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<link rel="icon" href="/favicon.ico" />
<link rel="preload" href="/css/D-DIN-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" href="/css/DSEG7Classic-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lora&display=swap&text=-:.0123456789" rel="stylesheet">
<title>Sync Timer - 同時視聴用タイマー</title>
<meta property="og:title" content="Sync Timer - 同時視聴用タイマー" />
<meta
property="og:description"
content="マイナスの秒数から開始できるストップウォッチです。同時視聴配信のタイミング合わせなどにどうぞ。"
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://sync-timer.netlify.app/" />
<meta
property="og:image"
content="https://sync-timer.netlify.app/images/SyncTimer.png"
/>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<header>
<nav class="container">
<ul>
<li><strong style="font-size: xx-large">SyncTimer</strong></li>
<li>
<a
href="/about/?utm_source=top"
class="secondary"
data-tooltip="SyncTimerはどんなアプリ?"
><i class="fas fa-circle-question"></i
></a>
</li>
</ul>
<ul>
<li style="text-align: center">
<div>
<a href="https://twitter.com/hashtag/sync_timer?f=live"
><i class="fab fa-twitter button-icon"></i>#sync_timer
</a>
</div>
<div>
<span class="hashtag-helper">利用報告待ってます!</span>
</div>
</li>
<li>
<a href="/en.html" role="button" class="outline secondary"
><i class="fas fa-language button-icon"></i>English</a
>
</li>
<li>
<a
href="#"
onClick="openDialog()"
class="secondary"
role="button"
data-tooltip="使い方を動画で見る"
>
<i class="fab fa-youtube button-icon"></i>使い方
</a>
</li>
</ul>
</nav>
</header>
<main>
<div id="root"></div>
</main>
<footer>
<div class="container">
<p>
機能要望や質問・感想などは<a
href="https://docs.google.com/forms/d/e/1FAIpQLSfgmFqq-t-vv6gC1YpgoH3nCK1b7gI0ROC25K1NX9r5jGtndg/viewform?usp=sf_link"
target="_blank"
rel="noopener noreferrer"
>こちらのフォームからどうぞ</a
>
</p>
<div id="request-from-developer">
<h4>開発者からのお願い</h4>
<div>
<small
>実際の利用状況を参考にしたいので、配信やチャンネルを教えてください</small
>
</div>
<form id="customer-url" name="customer-url" data-netlify="true">
<div class="grid">
<input
type="url"
name="user_url"
placeholder="配信やチャンネルのURL"
required
inputmode="url"
/>
<button type="submit">送信</button>
</div>
</form>
<p class="thanks" style="display: none">ありがとうございます!</p>
<div>
<small
>気に入っていただけたら配信の概要欄やTwitterでタイマーの紹介をお願いします</small
>
</div>
<textarea
name="introduce-request"
id="introduce-request"
rows="2"
readonly
>
同時視聴用タイマー SyncTimer を利用しています
https://sync-timer.netlify.app/</textarea
>
<a
href="https://twitter.com/intent/tweet?url=https%3A%2F%2Fsync-timer.netlify.app%2F&hashtags=sync_timer"
role="button"
target="_blank"
rel="noopener noreferrer"
><i class="fab fa-twitter button-icon"></i>Twitterで紹介する</a
>
</div>
<div class="grid">
<div class="footer-left">
<h4>開発者のひとこと</h4>
<p>
手書き文字風のフォントを追加しました。<a href="https://docs.google.com/forms/d/e/1FAIpQLScMezFWGTb_kdzS8jPiP-bu3KpwwGGOv7HkSbRdQdEiIodUtA/viewform?usp=header">おすすめのフォントがあれば教えてください。</a>
</p>
<p>
開発の履歴は<a
href="https://mather.github.io/tags/synctimer"
target="_blank"
>個人ブログ</a
>に記載してます。気になる方はどうぞ。
</p>
</div>
<div class="footer-right">
<div>
<a
href="https://youtube.com/playlist?list=PLzz5NMXBDKoZ8UoGCgQI9mdcfmyjugbwz"
target="_blank"
rel="noopener noreferrer"
data-tooltip="YouTubeでの利用例を集めてみました"
><i class="fab fa-youtube button-icon"></i>YouTubeでの利用例</a
>
</div>
<div>
<a
href="https://twitter.com/intent/user?user_id=62148177"
target="_blank"
rel="noopener noreferrer"
data-tooltip="開発者のTwitterアカウント"
><i class="fab fa-twitter button-icon"></i>@mather314
(開発者)</a
>
</div>
<div>
<a
href="https://github.com/mather/sync-timer"
class="secondary"
target="_blank"
rel="noopener noreferrer"
data-tooltip="ソースコードを見る"
><i class="fab fa-github button-icon"></i>mather/sync-timer</a
>
</div>
<div>© Eisuke Kuwahata</div>
</div>
</div>
</div>
</footer>
<dialog id="usage-dialog">
<article>
<header>
<a
href="#"
aria-label="Close"
class="close"
onclick="closeDialog()"
></a
>使い方を動画で見る
</header>
<div id="ytplayer"></div>
</article>
</dialog>
<script async src="./js/index.js" type="module"></script>
<script>
// Load the IFrame Player API code asynchronously.
const ytWidth = Math.min(window.innerWidth * 0.8, 1024);
const ytHeight = (ytWidth / 16) * 9;
var tag = document.createElement("script");
tag.src = "https://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// Replace the 'ytplayer' element with an <iframe> and
// YouTube player after the API code downloads.
let player;
function onYouTubePlayerAPIReady() {
player = new YT.Player("ytplayer", {
width: ytWidth,
height: ytHeight,
videoId: "m1Basm-TqGU",
});
}
const usageDialog = document.getElementById("usage-dialog");
const openDialog = () => {
usageDialog.showModal();
};
const closeDialog = () => {
if (player) player.pauseVideo();
usageDialog.close();
};
</script>
<script>
const handleSubmit = (event) => {
event.preventDefault();
const myForm = event.target;
const formData = new FormData(myForm);
// 空文字の送信を止め、バリデーションメッセージを表示
const urlInput = myForm.elements["user_url"];
const trimmed = urlInput?.value?.trim() ?? "";
if (!trimmed) {
urlInput.setCustomValidity("URLを入力してください。");
myForm.reportValidity();
return;
}
urlInput.setCustomValidity("");
formData.set("user_url", trimmed);
fetch("/", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams(formData).toString(),
})
.then(() => {
document.querySelector("#customer-url").remove();
document.querySelector(".thanks").removeAttribute("style");
})
.catch((error) => alert(error));
};
document
.querySelector("#customer-url")
.addEventListener("submit", handleSubmit);
</script>
</body>
</html>