Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
174 lines (165 loc) · 5.19 KB
/
Copy pathindex.html
File metadata and controls
174 lines (165 loc) · 5.19 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
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<style>
body {
width: 250px;
padding: 15px;
font-family: 'Segoe UI', sans-serif;
color: #333;
}
h3 { margin: 0 0 15px 0; font-size: 16px; }
/* 1. 메인 컨텐츠 */
#mainContent { display: block; }
.progress-container { margin-bottom: 20px; }
.status-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar-bg { width: 100%; height: 10px; background-color: #eee; border-radius: 5px; }
.bar-fill { width: 0%; height: 100%; background-color: #4CAF50; border-radius: 5px; transition: width 0.3s; }
button {
width: 100%; padding: 10px; background-color: #4CAF50; color: white;
border: none; border-radius: 4px; cursor: pointer; font-weight: bold; margin-bottom: 10px;
}
button:hover { background-color: #45a049; }
#downloadBtn {
background-color: #1976d2;
}
#downloadBtn:hover {
background-color: #1565c0;
}
#downloadBtn:disabled {
background-color: #bdbdbd;
cursor: default;
}
/* 2. 동영상 정보 섹션 */
.video-info {
background-color: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
padding: 10px;
margin-bottom: 15px;
}
.video-info summary {
font-size: 13px;
font-weight: 700;
color: #333;
cursor: pointer;
list-style: none;
}
.video-info summary::-webkit-details-marker {
display: none;
}
.video-info summary::before {
content: '▾ ';
display: inline-block;
transition: transform 0.2s ease;
}
.video-info[open] summary::before {
transform: rotate(180deg);
}
.video-info-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
margin-bottom: 8px;
font-size: 12px;
line-height: 1.3;
}
.video-info-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
margin-bottom: 8px;
font-size: 12px;
line-height: 1.3;
}
.meta-label {
color: #666;
min-width: 65px;
flex-shrink: 0;
}
.meta-value {
color: #333;
text-align: right;
word-break: break-word;
flex: 1;
}
.video-title {
font-size: 13px;
font-weight: 600;
color: #333;
margin-bottom: 0;
word-break: break-word;
}
.video-url {
font-size: 11px;
color: #0066cc;
word-break: break-all;
cursor: pointer;
text-decoration: underline;
display: inline-block;
text-align: right;
}
.video-url:hover {
color: #0052a3;
}
button:disabled {
background-color: #bdbdbd;
cursor: default;
}
/* 3. 에러 화면 */
#errorContent {
display: none;
text-align: center;
padding: 20px 0;
}
.error-msg {
font-size: 13px;
color: #666;
line-height: 1.5;
}
</style>
</head>
<body>
<h3>Hack LMS</h3>
<div id="mainContent">
<!-- 동영상 정보 표시 -->
<details class="video-info">
<summary>동영상 정보</summary>
<div class="video-info-row"><span class="meta-label">제목</span><span class="meta-value video-title" id="videoTitle">제목 불러오는 중...</span></div>
<div class="video-info-row"><span class="meta-label">URL</span><span class="video-url" id="videoUrl">URL 불러오는 중...</span></div>
<div class="video-info-row"><span class="meta-label">동영상 길이</span><span class="meta-value" id="videoLength">--:--</span></div>
<div class="video-info-row"><span class="meta-label">시청 길이</span><span class="meta-value" id="watchedLength">--:--</span></div>
</details>
<div class="status-label">
<span>학습 진도</span>
<span id="completionStatus" style="font-size: 11px; padding: 2px 6px; border-radius: 10px; background: #eee; color: #666;">확인 중...</span>
</div>
<div class="progress-container">
<div class="status-label">
<span>학습 진행 상태</span>
<b id="percentText">0%</b>
</div>
<div class="bar-bg">
<div id="progressBar" class="bar-fill"></div>
</div>
</div>
<button id="completeBtn">학습 완료시키기</button>
<button id="downloadBtn" disabled>인트로가 끝난 후 다시 시도해주세요.</button>
<div style="font-size: 11px; color: #666; text-align: center; margin: -4px 0 10px;">다운로드 시작 후에는 popup을 닫아도 됩니다.</div>
<div style="margin-top: 12px;">
<label for="playbackSpeed" style="font-size: 13px; margin-bottom: 5px; display: block;">배속 조절</label>
<div style="display: flex; align-items: center; gap: 10px;">
<input type="range" id="playbackSpeed" min="0.5" max="3" step="0.25" value="1" style="flex: 1;">
<span id="speedValue" style="font-size: 13px; min-width: 35px;">1x</span>
</div>
</div>
</div> <!-- #mainContent -->
<div id="errorContent">
<div class="error-msg">비디오 강의를 감지하지 못했습니다.</div>
</div>
<script src="index.js"></script>
</body>
</html>