-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
139 lines (118 loc) · 3.33 KB
/
popup.html
File metadata and controls
139 lines (118 loc) · 3.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CopyQ</title>
<style>
:root {
--primary-color: #2196F3;
--primary-hover: #1976D2;
--background-color: #ffffff;
--border-color: #e0e0e0;
--text-color: #333333;
--box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
padding: 24px;
width: 360px;
margin: 0;
background-color: var(--background-color);
color: var(--text-color);
}
h3 {
margin: 0 0 16px 0;
font-size: 20px;
font-weight: 600;
}
.container {
display: flex;
flex-direction: column;
gap: 16px;
}
.result-box {
padding: 16px;
border: 1px solid var(--border-color);
background-color: #f8f9fa;
border-radius: 8px;
box-shadow: var(--box-shadow);
font-size: 14px;
line-height: 1.5;
white-space: pre-wrap;
}
#loading {
color: #666;
font-size: 14px;
display: flex;
align-items: center;
gap: 8px;
justify-content: center;
}
.loading-spinner {
width: 16px;
height: 16px;
border: 2px solid #f3f3f3;
border-top: 2px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
button {
padding: 12px 20px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s ease;
box-shadow: var(--box-shadow);
}
button:hover {
background-color: var(--primary-hover);
transform: translateY(-1px);
}
button:active {
transform: translateY(0);
}
#copyText {
white-space: pre-wrap;
word-break: break-word;
}
.hidden {
display: none !important;
}
</style>
</head>
<body>
<div class="container">
<h3>CopyQ</h3>
<div id="loading" class="hidden">
<div class="loading-spinner"></div>
Memproses...
</div>
<div id="resultContainer" class="hidden">
<h3>Jawaban</h3>
<div id="resultText" class="result-box hidden">
</div>
</div>
<button id="fetchAIButton">
Ambil Hasil
</button>
<div id="copyTextContainer" class="hidden">
<h3>Teks yang disalin</h3>
<div id="copyText" class="result-box hidden">
</div>
</div>
<script src="popup.js"></script>
</body>
</html>