Repository navigation
Expand file tree
/
Copy pathpopup.html
More file actions
241 lines (211 loc) · 5.7 KB
/
Copy pathpopup.html
File metadata and controls
241 lines (211 loc) · 5.7 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Persistent Containers</title>
<style>
/* --- Design Tokens & Color Palettes --- */
:root {
--bg-color: #ffffff;
--text-color: #15141a;
--text-muted: #5b5b66;
--border-color: #e0e0e6;
--hover-bg: rgba(0, 0, 0, 0.05);
--accent-color: #37adff;
--accent-focus: #0060df;
--toggle-bg-off: #cfcfd8;
--link-color: #0060df;
}
/* Automatic Firefox/OS Dark Mode */
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #1c1b22;
--text-color: #fbfbfe;
--text-muted: #8f8f9d;
--border-color: #2b2a33;
--hover-bg: rgba(255, 255, 255, 0.08);
--accent-color: #0df;
--accent-focus: #66beff;
--toggle-bg-off: #4a4a55;
--link-color: #66beff;
}
}
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 12px;
width: 260px;
background-color: var(--bg-color);
color: var(--text-color);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 13px;
user-select: none;
}
/* Header section */
header {
display: flex;
align-items: center;
gap: 8px;
padding-bottom: 8px;
margin-bottom: 10px;
border-bottom: 1px solid var(--border-color);
}
header img {
width: 20px;
height: 20px;
flex-shrink: 0;
}
header h1 {
margin: 0;
font-size: 14px;
font-weight: 600;
letter-spacing: -0.2px;
}
/* Active Container Status Banner */
.status-badge {
display: flex;
align-items: center;
gap: 6px;
background-color: var(--hover-bg);
border-radius: 6px;
padding: 6px 8px;
margin-bottom: 10px;
font-size: 11px;
color: var(--text-muted);
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background-color: var(--accent-color);
flex-shrink: 0;
}
/* Setting Rows (Full clickable label target) */
.setting-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
padding: 8px;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.15s ease;
}
.setting-row:hover {
background-color: var(--hover-bg);
}
/* Disabled state (e.g. for unsupported Tab Groups API) */
.setting-row.disabled {
opacity: 0.45;
cursor: not-allowed;
pointer-events: none;
}
.setting-label {
font-size: 13px;
line-height: 1.3;
color: var(--text-color);
cursor: pointer;
}
/* Toggle Switch */
.toggle-switch {
position: relative;
display: inline-block;
width: 36px;
height: 20px;
flex-shrink: 0;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.slider {
position: absolute;
inset: 0;
border-radius: 20px;
background-color: var(--toggle-bg-off);
transition: background-color 0.2s ease, transform 0.1s ease;
}
.slider:before {
content: "";
position: absolute;
height: 14px;
width: 14px;
left: 3px;
bottom: 3px;
border-radius: 50%;
background-color: #ffffff;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
input:checked+.slider {
background-color: var(--accent-color);
}
input:checked+.slider:before {
transform: translateX(16px);
}
input:focus-visible+.slider {
outline: 2px solid var(--accent-focus);
outline-offset: 2px;
}
/* Footer links */
.link-container {
display: flex;
justify-content: center;
align-items: center;
gap: 12px;
margin-top: 14px;
padding-top: 8px;
border-top: 1px solid var(--border-color);
font-size: 11px;
}
.link-container a {
color: var(--link-color);
text-decoration: none;
}
.link-container a:hover {
text-decoration: underline;
}
.divider {
color: var(--text-muted);
opacity: 0.5;
}
</style>
</head>
<body>
<!-- Popup Header -->
<header role="banner">
<img src="../icons/icon.svg" alt="" aria-hidden="true" />
<h1>Persistent Containers</h1>
</header>
<!-- Setting 1: Open Tab Next to Current -->
<label class="setting-row" for="openNextToCurrent">
<span class="setting-label">Open next to current tab</span>
<span class="toggle-switch">
<input type="checkbox" id="openNextToCurrent" role="switch" checked />
<span class="slider" aria-hidden="true"></span>
</span>
</label>
<!-- Setting 2: Inherit Tab Group -->
<label class="setting-row" for="inheritTabGroup">
<span class="setting-label">Open in current tab group</span>
<span class="toggle-switch">
<input type="checkbox" id="inheritTabGroup" role="switch" checked />
<span class="slider" aria-hidden="true"></span>
</span>
</label>
<!-- Footer Links -->
<footer class="link-container" aria-label="Extension links">
<a href="https://github.com/navchandar/persistent-containers" target="_blank" rel="noopener noreferrer"
aria-label="View the source code on GitHub">Source</a>
<span class="divider" aria-hidden="true">|</span>
<a href="https://navchandar.github.io/persistent-containers/" target="_blank" rel="noopener noreferrer"
aria-label="Visit our help and support documentation">Help</a>
</footer>
<script src="popup.js"></script>
</body>
</html>