Repository navigation
Expand file tree
/
Copy pathoptions.html
More file actions
272 lines (234 loc) · 7.04 KB
/
Copy pathoptions.html
File metadata and controls
272 lines (234 loc) · 7.04 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Focus - Settings</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
margin: 0;
padding: 20px;
color: #333;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
border-radius: 12px;
padding: 30px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
margin-bottom: 30px;
display: flex;
align-items: center;
gap: 10px;
}
.section {
margin-bottom: 40px;
}
.section h2 {
color: #34495e;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #2c3e50;
}
input[type="text"], textarea {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 8px;
font-size: 14px;
box-sizing: border-box;
}
input[type="text"]:focus, textarea:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.button-group {
display: flex;
gap: 10px;
margin-top: 20px;
}
button {
padding: 12px 20px;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-primary {
background: #3498db;
color: white;
}
.btn-primary:hover {
background: #2980b9;
}
.btn-success {
background: #27ae60;
color: white;
}
.btn-success:hover {
background: #229954;
}
.btn-danger {
background: #e74c3c;
color: white;
}
.btn-danger:hover {
background: #c0392b;
}
.pattern-item {
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
margin-bottom: 15px;
display: flex;
justify-content: space-between;
align-items: center;
}
.pattern-info {
flex: 1;
}
.pattern-name {
font-weight: 600;
color: #2c3e50;
margin-bottom: 5px;
}
.pattern-regex {
font-family: monospace;
color: #7f8c8d;
font-size: 13px;
}
.pattern-actions {
display: flex;
gap: 10px;
align-items: center;
}
.toggle-switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.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: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #3498db;
}
input:checked + .slider:before {
transform: translateX(26px);
}
.empty-state {
text-align: center;
padding: 40px;
color: #7f8c8d;
}
.empty-state h3 {
margin-bottom: 10px;
}
.help-text {
font-size: 12px;
color: #7f8c8d;
margin-top: 5px;
}
.status-message {
padding: 10px;
border-radius: 8px;
margin-bottom: 20px;
display: none;
}
.status-message.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.status-message.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
</style>
</head>
<body>
<div class="container">
<h1>🎯 Focus Settings</h1>
<div class="status-message" id="status-message"></div>
<div class="section">
<h2>Confirmation Text</h2>
<div class="form-group">
<label for="confirmation-text">Text to type for confirmation:</label>
<input type="text" id="confirmation-text" placeholder="Enter confirmation text">
<div class="help-text">This text must be typed exactly to access blocked sites</div>
</div>
</div>
<div class="section">
<h2>Add New Pattern</h2>
<div class="form-group">
<label for="pattern-name">Pattern Name:</label>
<input type="text" id="pattern-name" placeholder="e.g., Social Media, News Sites">
</div>
<div class="form-group">
<label for="pattern-regex">Regular Expression:</label>
<input type="text" id="pattern-regex" placeholder="e.g., .*(facebook|twitter|instagram)\.com.*">
<div class="help-text">Use regex patterns to match URLs. Test your patterns before adding!</div>
</div>
<div class="button-group">
<button id="add-pattern" class="btn-primary">Add Pattern</button>
<button id="test-pattern" class="btn-success">Test Pattern</button>
</div>
</div>
<div class="section">
<h2>Current Patterns</h2>
<div id="patterns-list">
<div class="empty-state">
<h3>No patterns added yet</h3>
<p>Add your first pattern above to start blocking distracting sites</p>
</div>
</div>
</div>
</div>
<script src="options.js"></script>
</body>
</html>