-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathodinochka.html
312 lines (252 loc) · 9.35 KB
/
odinochka.html
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
<!DOCTYPE html>
<html>
<head>
<title>Odinochka</title>
<style>
:root {
color-scheme: light dark; /* both supported */
}
header, footer, article, div {
clear:both;
margin: 1em 3em 3em 3em;
}
div::after, form::after {
content:"";
clear:both;
display: block;
}
a.tab {
display: list-item;
list-style: none;
text-decoration: none;
margin-left: 3em;
padding-left: 3em;
width: fit-content;
max-width: 90%;
}
header.tab {
margin-bottom: .5em;
font-size: 110%;
display: inline-block;
}
a.tab:hover::before, a.tab:focus::before {
content: "\2716";
margin-left:-4.5em;
padding-right:3.25em;
text-decoration: none;
color: #888;
}
fieldset {
border-style: dashed;
}
button[name=import] {display:none}
input[name=importfile][value]:not([value=""]) ~ button[name=import] {display:block}
div#groups {
display: flex;
flex-direction: column;
}
span#clearFilter {
display: none;
}
</style>
<style>
/* popover setting bar based on https://developer.chrome.com/blog/css-wrapped-2023#popover-live-demo */
#menu {
width: 320px;
height: 100%;
/* undo popover styles */
border: none;
padding: 0;
margin: 0;
left: auto;
/* animate */
transition: translate 0.5s ease-out, display 0.5s ease-out allow-discrete,
overlay 0.5s ease-out allow-discrete;
translate: 250px 0;
&::backdrop {
opacity: 0;
background: rgba(0, 0, 0, 0.5);
transition: opacity 0.5s;
}
&:popover-open {
translate: 0 0;
&::backdrop {
opacity: 1;
}
@starting-style {
translate: 250px 0;
&::backdrop {
opacity: 0;
}
}
}
}
/* Other styles */
.menu-btn {
position: fixed;
top: 0;
right: 0;
background: none;
border: none;
filter: drop-shadow(2px 2px 0 #ff6dee);
}
.close-btn {
background: none;
border: none;
filter: grayscale(1) drop-shadow(2px 2px 0 #ff6dee);
float:right;
}
/* Hides the main scrollbar when popover is open */
body:has(#menu:popover-open) {
overflow: hidden; /* Hide scrollbars */
}
</style>
<style id=cssfilterstyle>
</style>
<style id=faviconstyle media="not all">
a.tab {
background-image: var(--bg-favicon);
background-repeat: no-repeat;
background-position: left center;
background-size: 1em 1em;
}
</style>
<style id=orderstyle media="not all">
div#groups {
flex-direction: column-reverse !important;
}
</style>
<style id="contextstyle" media="all">
div#context {
width: 100px;
position: fixed;
margin: 0;
}
div#context > form button {
width: 100px;
}
div.context-target {
background-color: purple
}
/* Lock group feature */
div.group.locked header::before {
content: "\1F512"
}
/* Collapse group feature */
div.group.collapsed header::after { content: " {...}" }
div.group.collapsed a { display:none ; }
/* Set which buttons are enabled, depending on locked or collapsed */
body:has(.context-target.locked) div#context button#unlock,
body:has(.context-target:not(.locked)) div#context button#lock,
body:has(.context-target:not(.locked)) div#context button#delete,
body:has(.context-target:not(.locked)) div#context button#rename,
body:has(.context-target:not(.locked).collapsed) div#context button#uncollapse,
body:has(.context-target:not(.locked):not(.collapsed)) div#context button#collapse { display: block; }
/* Popout feature */
body[query] .group header,
body[query] #size,
body[query] #backup-fieldset { display: none; }
</style>
</head>
<body>
<header>
<h1>Odinochka</h1>
<h2 id=size></h2>
URL Filter: <input type="text" name="filter" id=filter accesskey=/ /> <span id=clearFilter>✖</span>
<button class="menu-btn" popovertarget="menu" accesskey=q>☰</button>
</header>
<div id=groups>
<!-- fake data
<a class="tab" href="https://mail.google.com/mail/ca/u/1/#inbox" style='--bg-favicon: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACMklEQVRYR+3W2auOURQG8N9JhowpMynlggtESaIQGXNBSXFBSeHu/AsKVyKlCCncKCfckaEMqVOSIXeGMoTMY2Zap/3W521/b9/RqXPzrcv33WvtZz/rWc/eLbo5Wrp5f00ATQYKBkZiUY0gf+NIJwS6Cv1q1l/Gg0byCwCDMQUDMA1/sLWRAmnNTPTGdPTFSdxuJL+sgVHY+B8Air22YGgTQFczEG0akTh+gRBovejyFizDZPRKO/7AVYTKc5EDEBO2IbP4DK5XibAdg3ANHxECXYr+uInTmaI5AH0wDvPShJxFHOQ53tUDELVjjo+WNhmGTXTcIYfxqPQ/B6AHVmB0qvemNqcKwDHcz5xyLcbjYcasygCidasTa1EvmPwnqgDsxKcMgNmYj+/YUcHAPQTYMKiD+JoTTRWAcMJwxHKEUy5PH8sgCwYuJGcdgl84hGedAVBlxZOwMhXbi1c1hQsAkX8nTc8EvMb+JL6GW7A9l4AZWJyqbMPPDIBbOIWYgM0YWG9yqlqwB28ztC1EXD4fsKuBKRiL9WlyTuBuo1NwLnlAeX1rujWv4GIDAGLJXMzBN+yL+S/yqhh4iTaE/RaxALNSod0ZZdez4tgnWAg2HicP6RB4+UEScxvWGT8PYA2e4D3GJDP5guMlE1qC4ckteyZhfsZ5PMW65IJxVUeECwYbbeUHSXHSAHAJ4XwTE/L4F+hvpP7Xsj812XZZMjEJ4XxBfy7am4/SJgNNBrqdgb/paZI3kaIx2QAAAABJRU5ErkJggg==")' id=2>Inbox - neal@njnm.co - NJNM consulting Mail</a>
-->
</div>
<div popover id="context" >
<form name="contextActions">
<button id=popout> Pop Out </button>
<button hidden id=rename> Rename </button>
<button hidden id=lock> Lock </button>
<button hidden id=unlock> Unlock </button>
<button hidden id=collapse> Collapse </button>
<button hidden id=uncollapse> Uncollapse </button>
<button hidden id=delete> Remove All </button>
<hr>
<button id=copy-html> Copy HTML </button>
<button id=copy-md> Copy MD </button>
<button id=copy-gist> Create Gist </button>
</form>
</div>
<div popover role="menu" id="menu">
<button class="close-btn" popovertarget="menu" popovertargetaction="hide">
<span>❌</span>
</button>
<form name=options class=options><fieldset>
<legend>Options</legend>
<fieldset>
<legend>Duplicates</legend>
<input type=radio name=dupe value=keep><label>Keep</label><br/>
<input type=radio name=dupe value=update><label>Update</label><br/>
<input type=radio name=dupe value=reject><label>Reject</label><br/>
</fieldset>
<fieldset>
<legend>Pinned Tabs</legend>
<input type=radio name=pinned value=save><label>Save</label><br/>
<input type=radio name=pinned value=skip><label>Skip</label><br/>
</fieldset>
<fieldset>
<legend>Audible Tabs</legend>
<input type=radio name=audible value=close><label>Save & close</label><br/>
<input type=radio name=audible value=leave><label>Save & leave open</label><br/>
<input type=radio name=audible value=skip><label>Skip</label><br/>
</fieldset>
<fieldset>
<legend>On restore</legend>
<input type=radio name=restore value=remove><label>Remove from list</label><br/>
<input type=radio name=restore value=keep><label>Keep</label><br/>
</fieldset>
<fieldset>
<legend>Restore groups to</legend>
<input type=radio name=group value=new><label>Always new window</label><br/>
<input type=radio name=group value=smart><label>Smart</label><br/>
<input type=radio name=group value=current><label>Always current window</label><br/>
<input type=radio name=group value=tabGroup><label>Always tab group.</label><br/>
</fieldset>
<fieldset>
<legend>Favicons</legend>
<input type=radio name=favicon value=show data-media='all'><label>Show</label><br/>
<input type=radio name=favicon value=hide data-media='not all'><label>Hide</label><br/>
</fieldset>
<fieldset>
<legend>Sort order</legend>
<input type=radio name=order value=asc data-media='all'><label>Oldest First</label><br/>
<input type=radio name=order value=desc data-media='not all'><label>Newest First</label><br/>
</fieldset>
<fieldset>
<legend>Focus after add</legend>
<input type=radio name=grabfocus value=always><label>Always</label><br/>
<input type=radio name=grabfocus value=never><label>Never</label><br/>
<input type=radio name=grabfocus value=unpinned><label>When unpinned</label><br/>
</fieldset>
<fieldset id=backup-fieldset>
<legend>Data backup</legend>
<input type=file name=importfile id=importfile><br/>
<button name=import id=import>Import</button><br/>
<button name=export id=export>Export</button>
<button name=gdrive id=gdrive>Export to gdrive</button>
</fieldset>
<fieldset>
<legend>Gist Config</legend>
<button name=gist id=gist>Set GitHub PAT</button>
</fieldset>
</fieldset></form>
</div>
<footer>
<p>
Copyright njnm 2019-2023.
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GPL-3.</a>
<a href="https://github.com/njnmco/odinochka">GitHub</a>
<a href="https://github.com/sponsors/nfultz">Sponsor</a>
</p>
</footer>
<script type=module src="odinochka.js"></script>
</body>
</html>