-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate.html
More file actions
369 lines (324 loc) · 12.1 KB
/
create.html
File metadata and controls
369 lines (324 loc) · 12.1 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<!-- SimpleCookie, a minimalist yet efficient cookie manager for Firefox -->
<!-- Made with ❤ by micka from Paris -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Create and edit cookies in Firefox with SimpleCookie">
<title>SimpleCookie | Create & Edit</title>
<style>
/* CSS Variables for theming */
:root {
/* Light theme (default) */
--primary-color: #05A55D;
--text-color: #333;
--light-gray: #f5f5f5;
--border-color: #e0e0e0;
--success-color: #34A853;
--error-color: #EA4335;
--background-color: #FFFFFF;
--input-background: #FFFFFF;
--input-border: #e0e0e0;
--section-background: #FFFFFF;
--message-success-bg: #E8F5E9;
--message-success-color: #1B5E20;
--message-error-bg: #FFEBEE;
--message-error-color: #B71C1C;
--button-hover: #EE2E91;
--icon-opacity: 0.15;
--close-button-color: #666;
--close-button-hover: rgba(0,0,0,0.05);
}
/* Dark theme */
[data-theme="dark"] {
--primary-color: #05A55D;
--text-color: #FCFCFF;
--light-gray: #2A2A35;
--border-color: #4D4D57;
--success-color: #34A853;
--error-color: #F28B82;
--background-color: #23222B;
--input-background: #33323D;
--input-border: #4D4D57;
--section-background: #33323D;
--message-success-bg: #143A24;
--message-success-color: #7AE28C;
--message-error-bg: #4C1B1A;
--message-error-color: #F5AEA6;
--button-hover: #FF5DB1;
--icon-opacity: 0.25;
--close-button-color: #aaa;
--close-button-hover: rgba(255,255,255,0.1);
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
padding: 0;
color: var(--text-color);
background-color: var(--background-color);
line-height: 1.6;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 30px 20px;
}
h1 {
font-family: 'Poppins', sans-serif;
font-size: 25px;
font-weight: 400;
margin-bottom: 25px;
color: var(--primary-color);
padding-bottom: 10px;
position: relative;
letter-spacing: -0.5px;
}
.header-container {
position: relative;
margin-bottom: 30px;
}
.background-icon {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 45px;
height: 45px;
opacity: var(--icon-opacity);
background-image: url('resources/96.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.form-group {
margin-bottom: 18px;
display: flex;
align-items: center;
}
label {
display: inline-block;
width: 140px;
font-weight: 500;
font-size: 15px;
color: var(--text-color);
}
input,
select {
flex: 1;
padding: 8px 12px;
border: 1px solid var(--border-color);
border-radius: 4px;
font-size: 14px;
color: var(--text-color);
background-color: var(--input-background);
transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus,
select:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}
input::placeholder {
color: #999;
}
.required label::after {
content: " *";
color: var(--error-color);
}
button {
background-color: var(--primary-color);
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
font-size: 15px;
cursor: pointer;
margin-top: 10px;
transition: background-color 0.2s;
}
button:hover {
background-color: var(--button-hover);
}
#messageBox {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 15px 25px;
border-radius: 4px;
display: none;
font-size: 14px;
z-index: 1000;
max-width: 80%;
text-align: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.success-message {
background-color: var(--message-success-bg);
border-left: 4px solid var(--success-color);
color: var(--message-success-color);
}
.error-message {
background-color: var(--message-error-bg);
border-left: 4px solid var(--error-color);
color: var(--message-error-color);
}
#closeMessage {
position: absolute;
top: 5px;
right: 5px;
background: none;
border: none;
color: var(--close-button-color);
font-size: 18px;
cursor: pointer;
padding: 0;
margin: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
#closeMessage:hover {
background-color: var(--close-button-hover);
}
.section {
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 15px 20px;
margin-bottom: 35px;
margin-top: 15px;
position: relative;
background-color: var(--section-background);
}
.section-title {
font-size: 15px;
font-weight: 500;
color: var(--primary-color);
position: absolute;
top: -22px;
left: 15px;
background-color: var(--background-color);
padding: 3px 12px;
border-radius: 4px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
border: 1px solid var(--border-color);
}
.section .form-group:first-of-type {
margin-top: 10px;
}
.section .form-group:last-of-type {
margin-bottom: 0;
}
.beta-text {
margin-top: 20px;
text-align: right;
font-size: 12px;
color: #777;
}
@media (max-width: 600px) {
.form-group {
flex-direction: column;
align-items: flex-start;
}
label {
width: 100%;
margin-bottom: 5px;
}
input,
select {
width: 100%;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header-container">
<h1>SimpleCookie | <b>Create & Edit</b></h1>
<div class="background-icon"></div>
</div>
<div id="messageBox">
<span id="messageText"></span>
<button id="closeMessage" aria-label="Close message">×</button>
</div>
<form id="createCookieForm">
<!-- Basic Cookie Properties -->
<div class="section">
<div class="section-title">Basic Properties</div>
<div class="form-group required">
<label for="name" title="If you update a cookie by changing its name, SimpleCookie will most likely create another cookie">Name</label>
<input type="text" id="name" required aria-required="true">
</div>
<div class="form-group required">
<label for="value" title="Data stored in the cookie (e.g., session token, preferences)">Value</label>
<input type="text" id="value" required aria-required="true">
</div>
<div class="form-group required">
<label for="domain" title="In Firefox's Cookie API, a domain with a leading dot (`.example.com`) matches the base domain and all its subdomains, while a host without the leading dot (`example.com`) matches only that exact domain">Domain</label>
<input type="text" id="domain" required placeholder="example.com" aria-required="true">
</div>
<div class="form-group required">
<label for="path" title="URL path where cookie is valid (/ means entire domain)">Path</label>
<input type="text" id="path" value="/" required aria-required="true">
</div>
</div>
<!-- Security Settings -->
<div class="section">
<div class="section-title">Security Settings</div>
<div class="form-group">
<label for="secure" title="If Yes, cookie is only sent over HTTPS connections">Secure</label>
<select id="secure">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
<div class="form-group">
<label for="httpOnly" title="If Yes, JavaScript cannot access this cookie">HttpOnly</label>
<select id="httpOnly">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
<div class="form-group">
<label for="sameSite" title="Controls cross-site cookie behavior (None: all requests, Lax: limited cross-site, Strict: same-site only)">SameSite</label>
<select id="sameSite">
<option value="no_restriction">None</option>
<option value="lax">Lax</option>
<option value="strict">Strict</option>
</select>
</div>
</div>
<!-- Advanced Options -->
<div class="section">
<div class="section-title">Advanced Options</div>
<div class="form-group">
<label for="partitionKey" title="Site URL for partitioned cookies (CHIPS). Enter with or without 'https://' prefix (e.g., 'google.com' or 'https://google.com')">Partition Key</label>
<input type="text" id="partitionKey" placeholder="example.com">
</div>
<div class="form-group">
<label for="storeId" title="Firefox container for this cookie">Container</label>
<select id="storeId">
<option value="">Loading containers...</option>
</select>
</div>
<div class="form-group">
<label for="firstPartyDomain" title="Domain that should be treated as first-party for this cookie">First Party Domain</label>
<input type="text" id="firstPartyDomain" placeholder="example.com">
</div>
<div class="form-group">
<label for="expirationDate" title="When cookie expires (if blank, becomes a session cookie)">Expires</label>
<input type="date" id="expirationDate">
</div>
</div>
<div id="beta-text" class="beta-text">Proceed with caution ⚠️</div>
<button type="submit">Create Cookie</button>
</form>
</div>
<script src="create.js"></script>
</body>
</html>