-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidepanel.html
More file actions
348 lines (332 loc) · 18.2 KB
/
Copy pathsidepanel.html
File metadata and controls
348 lines (332 loc) · 18.2 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Atlas Sidebar</title>
<link rel="stylesheet" href="sidepanel.css" />
</head>
<body>
<svg class="icon-sprite" aria-hidden="true">
<defs>
<symbol id="icon-chevron-left" viewBox="0 0 24 24"><path d="m15 18-6-6 6-6" /></symbol>
<symbol id="icon-chevron-right" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6" /></symbol>
<symbol id="icon-refresh" viewBox="0 0 24 24"><path d="M21 12a9 9 0 1 1-2.64-6.36L21 8" /><path d="M21 3v5h-5" /></symbol>
<symbol id="icon-arrow-right" viewBox="0 0 24 24"><path d="M5 12h14" /><path d="m13 6 6 6-6 6" /></symbol>
<symbol id="icon-external-link" viewBox="0 0 24 24"><path d="M15 3h6v6" /><path d="m10 14 11-11" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /></symbol>
<symbol id="icon-settings" viewBox="0 0 24 24"><path d="M4 6h8" /><path d="M16 6h4" /><circle cx="14" cy="6" r="2" /><path d="M4 12h2" /><path d="M10 12h10" /><circle cx="8" cy="12" r="2" /><path d="M4 18h10" /><path d="M18 18h2" /><circle cx="16" cy="18" r="2" /></symbol>
<symbol id="icon-inbox" viewBox="0 0 24 24"><path d="M4 4h16v13a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3Z" /><path d="M4 13h4l2 3h4l2-3h4" /></symbol>
<symbol id="icon-x" viewBox="0 0 24 24"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></symbol>
<symbol id="icon-trash" viewBox="0 0 24 24"><path d="M3 6h18" /><path d="M8 6V4h8v2" /><path d="m19 6-1 15H6L5 6" /><path d="M10 11v5" /><path d="M14 11v5" /></symbol>
<symbol id="icon-download" viewBox="0 0 24 24"><path d="M12 3v12" /><path d="m7 10 5 5 5-5" /><path d="M5 21h14" /></symbol>
<symbol id="icon-copy" viewBox="0 0 24 24"><rect x="8" y="8" width="12" height="12" rx="2" /><path d="M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2" /></symbol>
<symbol id="icon-message-plus" viewBox="0 0 24 24"><path d="M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4Z" /><path d="M12 7v6" /><path d="M9 10h6" /></symbol>
<symbol id="icon-pages" viewBox="0 0 24 24"><rect x="4" y="6" width="14" height="15" rx="2" /><path d="M8 6V3h12v15h-2" /></symbol>
<symbol id="icon-bookmark" viewBox="0 0 24 24"><path d="M6 3h12v18l-6-4-6 4Z" /></symbol>
<symbol id="icon-edit" viewBox="0 0 24 24"><path d="M12 20h9" /><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L8 18l-4 1 1-4Z" /></symbol>
<symbol id="icon-check" viewBox="0 0 24 24"><path d="m5 12 4 4L19 6" /></symbol>
</defs>
</svg>
<main class="app-shell">
<header class="browser-toolbar" aria-label="Sidebar browser toolbar">
<nav class="navigation-controls" aria-label="Page navigation">
<button id="back" class="icon-button" type="button" aria-label="Back" title="Previous entered address">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-chevron-left" /></svg>
</button>
<button id="forward" class="icon-button optional-forward" type="button" aria-label="Forward" title="Next entered address">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-chevron-right" /></svg>
</button>
<button id="reload" class="icon-button" type="button" aria-label="Reload" title="Reload page">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-refresh" /></svg>
</button>
</nav>
<form id="address-form" class="address-form">
<label class="sr-only" for="address">Address</label>
<div class="address-field">
<input
id="address"
name="address"
inputmode="url"
autocomplete="url"
spellcheck="false"
placeholder="Enter a web address"
/>
<button class="go-button" type="submit" aria-label="Open address" title="Open address">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-arrow-right" /></svg>
</button>
</div>
</form>
<button id="open-external" class="icon-button" type="button" aria-label="Open in tab" title="Open in tab">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-external-link" /></svg>
</button>
<button
id="page-library-toggle"
class="icon-button page-library-toggle"
type="button"
aria-label="Pages"
aria-controls="page-library"
aria-expanded="false"
title="Pages"
>
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-pages" /></svg>
<span id="page-library-badge" class="stage-badge" aria-hidden="true" hidden>0</span>
</button>
<button
id="stage-toggle"
class="icon-button stage-toggle"
type="button"
aria-label="Temporary materials"
aria-controls="staging-drawer"
aria-expanded="false"
title="Temporary materials"
>
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-inbox" /></svg>
<span id="stage-badge" class="stage-badge" aria-hidden="true" hidden>0</span>
</button>
<button id="open-settings" class="icon-button settings-button" type="button" aria-label="Settings" title="Settings">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-settings" /></svg>
</button>
<span id="status" class="sr-only" role="status" aria-live="polite" aria-atomic="true">Ready</span>
</header>
<aside
id="staging-drawer"
class="staging-drawer"
role="region"
aria-labelledby="staging-title"
tabindex="-1"
hidden
>
<header class="staging-header">
<div>
<h2 id="staging-title">Temporary materials</h2>
<span
id="staging-summary"
role="status"
aria-live="polite"
aria-atomic="true"
>0 items</span>
</div>
<div class="staging-header-actions">
<button id="clear-staging" class="text-action" type="button">Clear</button>
<button id="close-staging" class="drawer-close" type="button" aria-label="Close temporary materials">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-x" /></svg>
</button>
</div>
</header>
<div class="capture-actions" role="group" aria-label="Add content from the current page">
<span class="capture-feature" data-feature="link">
<button type="button" data-capture-kind="link">Link</button>
</span>
<span class="capture-feature" data-feature="screenshot">
<button type="button" data-capture-kind="screenshot">Screenshot</button>
</span>
<span class="capture-feature" data-feature="document">
<label class="sr-only" for="document-source">Document source</label>
<select id="document-source" class="document-source" hidden>
<option value="">Current page content</option>
</select>
<button type="button" data-capture-kind="document">Document</button>
</span>
<span class="capture-feature" data-feature="local-file">
<button id="local-file" type="button">Local file</button>
<input
id="local-file-input"
type="file"
accept=".pdf,.txt,.md,.markdown,application/pdf,text/plain,text/markdown"
hidden
/>
</span>
<span class="capture-feature" data-feature="prompt">
<button id="saved-prompts" type="button">Prompt</button>
</span>
<span class="capture-feature" data-feature="transcript">
<label class="sr-only" for="transcript-language">Transcript language</label>
<select id="transcript-language" class="transcript-language" hidden>
<option value="">Detecting transcripts…</option>
</select>
<button type="button" data-capture-kind="transcript">Transcript</button>
</span>
</div>
<div id="staging-empty" class="staging-empty">
Select text on a page, then use the nearby + or right-click to add it.
</div>
<div
id="staging-list"
class="staging-list"
role="list"
aria-label="Temporary material list"
></div>
<p
id="staging-message"
class="staging-message"
role="status"
aria-live="polite"
aria-atomic="true"
></p>
<footer class="staging-footer">
<button id="copy-diagnostics" class="text-action" type="button">
Copy diagnostics
</button>
<div class="staging-primary-actions">
<button id="copy-selected" class="secondary-action compact-secondary-action" type="button" disabled>
<svg class="ui-icon button-icon" aria-hidden="true" focusable="false"><use href="#icon-copy" /></svg>
<span class="button-label">Copy selected</span>
</button>
<button id="download-selected" class="secondary-action compact-secondary-action" type="button" disabled>
<svg class="ui-icon button-icon" aria-hidden="true" focusable="false"><use href="#icon-download" /></svg>
<span class="button-label">Download selected</span>
</button>
<button id="transfer-selected" class="transfer-button" type="button" disabled>
<svg class="ui-icon button-icon" aria-hidden="true" focusable="false"><use href="#icon-message-plus" /></svg>
<span class="button-label">Add to ChatGPT</span>
</button>
</div>
</footer>
</aside>
<dialog id="page-library" class="page-library" aria-labelledby="page-library-title">
<div class="page-library-shell">
<header class="page-library-header">
<div>
<h2 id="page-library-title">Pages</h2>
<p id="page-library-summary" class="sr-only">0 saved · 0 recent</p>
</div>
<button id="close-page-library" class="drawer-close" type="button" aria-label="Close page list">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-x" /></svg>
</button>
</header>
<section class="page-library-current" aria-labelledby="current-page-heading">
<div class="page-entry-copy">
<h3 id="current-page-heading">Current page</h3>
<div class="current-page-meta">
<div class="current-page-title-line">
<strong id="current-page-title" class="current-page-source-title"></strong>
<button id="edit-current-page-name" class="page-entry-edit-action current-page-edit-action" type="button" aria-label="Custom page name" title="Custom page name">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-edit" /></svg>
</button>
</div>
<span id="current-page-url"></span>
</div>
<label class="sr-only" for="current-page-name">Custom page name</label>
<div id="current-page-name-row" class="current-page-name-row" hidden>
<input id="current-page-name" class="current-page-name" type="text" maxlength="80" autocomplete="off" />
<button id="save-current-page-name" class="icon-button current-page-name-save" type="button">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-check" /></svg>
<span class="button-label sr-only">Save name</span>
</button>
<button id="cancel-current-page-name" class="icon-button current-page-name-save" type="button" aria-label="Cancel edit" title="Cancel edit">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-x" /></svg>
</button>
</div>
</div>
<button id="save-current-page" class="secondary-action" type="button">
<svg class="ui-icon button-icon" aria-hidden="true" focusable="false"><use href="#icon-bookmark" /></svg>
<span class="button-label">Save current</span>
</button>
</section>
<div class="page-library-controls">
<label class="sr-only" for="page-library-search">Search pages</label>
<input
id="page-library-search"
class="page-library-search"
type="search"
autocomplete="off"
placeholder="Search names, titles, domains, or URLs"
/>
<div class="page-library-tabs" role="tablist" aria-label="Page scope">
<button
id="saved-pages-tab"
class="page-library-tab"
type="button"
role="tab"
aria-selected="true"
aria-controls="page-library-list-panel"
><span class="page-library-tab-label">Saved</span><span id="saved-pages-count">0</span></button>
<button
id="recent-pages-tab"
class="page-library-tab"
type="button"
role="tab"
aria-selected="false"
aria-controls="page-library-list-panel"
><span class="page-library-tab-label">Recent</span><span id="recent-pages-count">0</span></button>
</div>
</div>
<section id="page-library-list-panel" class="page-library-list-panel" role="tabpanel" aria-labelledby="saved-pages-tab">
<p id="page-library-empty" class="page-library-empty">No saved pages yet.</p>
<div id="page-library-list" class="page-library-list" role="list"></div>
</section>
<footer class="page-library-footer">
<div class="page-library-footer-summary">
<span id="page-library-list-summary"></span>
<span id="page-library-selected-count" hidden>0 selected</span>
</div>
<div class="page-library-footer-actions">
<button id="select-all-page-results" class="text-action" type="button">Select current results</button>
<button id="view-all-recent-pages" class="text-action" type="button" hidden>Show all</button>
<button id="clear-recent-pages" class="text-action" type="button" hidden>Clear recent</button>
<button id="delete-selected-pages" class="secondary-action page-library-delete-selected" type="button" disabled hidden>
<svg class="ui-icon button-icon" aria-hidden="true" focusable="false"><use href="#icon-trash" /></svg>
<span class="button-label">Delete selected</span>
</button>
</div>
</footer>
<p id="page-library-message" class="page-library-message" role="status" aria-live="polite"></p>
</div>
</dialog>
<dialog id="prompt-picker" class="prompt-picker" aria-labelledby="prompt-picker-title">
<div class="prompt-picker-shell">
<header class="prompt-picker-header">
<div>
<h2 id="prompt-picker-title">Saved prompts</h2>
<p id="prompt-picker-description">Choose a prompt. Fill variables now or leave them for the ChatGPT composer.</p>
</div>
<button id="close-prompt-picker" class="drawer-close" type="button" aria-label="Close prompts">
<svg class="ui-icon" aria-hidden="true" focusable="false"><use href="#icon-x" /></svg>
</button>
</header>
<label class="sr-only" for="prompt-picker-search">Search prompts</label>
<input id="prompt-picker-search" class="prompt-picker-search" type="search" placeholder="Search names, text, or tags" />
<div id="prompt-picker-empty" class="prompt-picker-empty">No saved prompts yet.</div>
<div id="prompt-picker-list" class="prompt-picker-list" role="listbox" aria-label="Choose a prompt"></div>
<section id="prompt-variable-panel" class="prompt-variable-panel" hidden aria-labelledby="selected-prompt-name">
<h3 id="selected-prompt-name"></h3>
<p id="selected-prompt-preview"></p>
<div id="prompt-variable-fields" class="prompt-variable-fields"></div>
<p id="prompt-variable-help" class="prompt-variable-help" hidden>Variables are optional. Blank values stay as placeholders for the ChatGPT composer.</p>
</section>
<p id="prompt-picker-message" class="editor-error" role="alert"></p>
<footer class="prompt-picker-actions">
<button id="manage-prompts" class="text-action" type="button">Manage prompts</button>
<button id="add-saved-prompt" class="transfer-button" type="button" disabled>Add to materials</button>
</footer>
</div>
</dialog>
<section class="viewport" aria-label="Web content">
<iframe
id="browser-frame"
title="Atlas Sidebar browser"
referrerpolicy="strict-origin-when-cross-origin"
allow="clipboard-read; clipboard-write; microphone; camera; fullscreen"
></iframe>
<div id="error-panel" class="error-panel" hidden>
<strong id="error-title">This page cannot be opened in the sidebar right now</strong>
<p id="error-message"></p>
<div class="error-actions">
<button id="error-retry" type="button">Retry</button>
<button id="error-open-external" type="button">Open in a tab instead</button>
</div>
</div>
</section>
</main>
<script src="settings.js"></script>
<script src="prompts.js"></script>
<script src="url.js"></script>
<script src="page-sessions.js"></script>
<script src="blob-store.js"></script>
<script src="transcript.js"></script>
<script src="bilibili-transcript.js"></script>
<script src="transfer-format.js"></script>
<script src="material-export.js"></script>
<script src="sidepanel.js"></script>
</body>
</html>