-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
252 lines (214 loc) · 4.83 KB
/
Copy pathpopup.html
File metadata and controls
252 lines (214 loc) · 4.83 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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>
body {
font-family: system-ui, sans-serif;
margin: 16px;
width: 280px;
}
.header {
text-align: center;
margin-bottom: 16px;
}
.header h2 {
margin: 0 0 4px 0;
font-size: 16px;
font-weight: 600;
}
.header small {
color: #666;
font-size: 11px;
}
.status-indicator {
display: flex;
align-items: center;
gap: 8px;
padding: 10px;
background: #f5f5f5;
border-radius: 6px;
margin: 12px 0;
font-size: 13px;
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.active {
background: #4caf50;
animation: pulse 2s ease-in-out infinite;
}
.status-dot.inactive {
background: #9e9e9e;
}
.status-dot.checking {
background: #ff9800;
}
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.toggle-section {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
background: white;
border: 1px solid #e0e0e0;
border-radius: 6px;
margin: 12px 0;
}
.toggle-label {
font-weight: 500;
font-size: 14px;
}
.toggle-value {
font-weight: 600;
font-size: 13px;
color: #444;
}
.toggle-switch {
position: relative;
width: 48px;
height: 26px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: 0.3s;
border-radius: 26px;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 3px;
bottom: 3px;
background-color: white;
transition: 0.3s;
border-radius: 50%;
}
input:checked+.slider {
background-color: #4caf50;
}
input:checked+.slider:before {
transform: translateX(22px);
}
.info-text {
font-size: 12px;
color: #666;
line-height: 1.5;
padding: 8px;
background: #f9f9f9;
border-radius: 4px;
margin-top: 12px;
}
.site-card {
border: 1px solid #e0e0e0;
border-radius: 6px;
padding: 10px;
background: #fff;
margin: 12px 0;
}
.site-title {
font-size: 11px;
color: #777;
margin-bottom: 4px;
text-transform: uppercase;
letter-spacing: 0.4px;
}
.site-host {
font-size: 13px;
font-weight: 600;
margin-bottom: 6px;
word-break: break-word;
}
.site-status {
font-size: 12px;
color: #666;
line-height: 1.4;
}
.site-toggle {
margin: 10px 0 0 0;
padding: 10px;
background: #f9f9f9;
}
.install-hint {
display: none;
margin-top: 8px;
font-size: 12px;
color: #8b1c1c;
background: #fff4f4;
border: 1px solid #f0c2c2;
border-radius: 4px;
padding: 8px;
word-break: break-word;
}
.domain-hint {
display: none;
margin-top: 8px;
font-size: 12px;
color: #7a4a00;
background: #fff9eb;
border: 1px solid #f0d39c;
border-radius: 4px;
padding: 8px;
}
</style>
</head>
<body>
<div class="header">
<h2>Redactosaurus</h2>
<small>PII Detection & Protection</small>
</div>
<div class="status-indicator">
<div class="status-dot checking" id="statusDot"></div>
<div id="statusText">Checking status...</div>
</div>
<div class="toggle-section">
<span class="toggle-label">Protection</span>
<span class="toggle-value" id="protectionStateText">Checking...</span>
</div>
<div class="install-hint" id="installHint">
Please install Redactosaurus on your computer to enable protection.
</div>
<div class="domain-hint" id="domainHint">
Please add at least one domain to protect.
</div>
<div class="site-card">
<div class="site-title">Current Site</div>
<div class="site-host" id="siteHost">Loading...</div>
<div class="site-status" id="siteStatus">Checking site rules...</div>
<div class="toggle-section site-toggle" id="siteToggleSection">
<span class="toggle-label">Temporary Enable</span>
<label class="toggle-switch">
<input type="checkbox" id="siteToggle" />
<span class="slider"></span>
</label>
</div>
</div>
<div class="info-text">
Protection is active by default only on configured AI chat domains. For other sites, use Temporary Enable for one-off sessions.
</div>
<script type="module" src="popup.js"></script>
</body>
</html>