${serverUrl.value}/archive/${testSnapshot.url}
.
235 | `;
236 | // Clear the input on success
237 | testUrlInput.value = '';
238 | } catch (error) {
239 | testStatus.innerHTML += `
240 |
241 | Error: ${error.message}
242 | `;
243 | } finally {
244 | testButton.disabled = false;
245 | }
246 | }
247 | });
248 |
249 | // Add Enter key support for test URL input
250 | testUrlInput.addEventListener('keypress', (e) => {
251 | if (e.key === 'Enter') {
252 | e.preventDefault();
253 | testButton.click();
254 | }
255 | });
256 | }
257 |
--------------------------------------------------------------------------------
/cookies-tab.js:
--------------------------------------------------------------------------------
1 | let availableCookies = [];
2 | let selectedCookieDomains = new Set();
3 |
4 | import { formatCookiesForExport } from './utils.js';
5 |
6 | export async function loadAvailableCookies() {
7 |
8 |
9 | const allCookies = await chrome.cookies.getAll({});
10 |
11 | // Group cookies by domain
12 | const cookiesByDomain = {};
13 | for (const cookie of allCookies) {
14 | const domain = cookie.domain.startsWith('.') ? cookie.domain.slice(1) : cookie.domain;
15 | cookiesByDomain[domain] = cookiesByDomain[domain] || [];
16 | cookiesByDomain[domain].push({
17 | name: cookie.name,
18 | value: cookie.value,
19 | domain: cookie.domain,
20 | path: cookie.path,
21 | secure: cookie.secure,
22 | httpOnly: cookie.httpOnly,
23 | sameSite: cookie.sameSite,
24 | expirationDate: cookie.expirationDate
25 | });
26 | }
27 |
28 | availableCookies = Object.entries(cookiesByDomain).map(([domain, cookies]) => ({
29 | domain,
30 | cookies,
31 | selected: selectedCookieDomains.has(domain)
32 | }));
33 |
34 | renderCookieTable();
35 | }
36 |
37 | function renderCookieTable(filterText = '') {
38 | const tbody = document.getElementById('cookieTable').querySelector('tbody');
39 | const filteredCookies = availableCookies.filter(item =>
40 | item.domain.toLowerCase().includes(filterText.toLowerCase())
41 | );
42 |
43 | tbody.innerHTML = filteredCookies.map(item => `
44 | ${item.url}
Archiving Profiles
by importing the credentials you need from a browser.
321 | An Archiving Profile
is ArchiveBox's equivalent to a browser profile, it's a set of cookies or login credentials to the websites you want to capture.Export cookies.txt
button on the profile you want to use below. 325 | # save the cookies.txt contents into a text file on your ArchiveBox server, then run: 326 | archivebox config --set COOKIE_FILE=$PWD/cookies.txt 327 | 328 | # advanced: copy a Chrome user data directory (Profile Path visible on chrome://profile-internals) to the server to use it for logged-in archiving: 329 | archivebox config --set CHROME_USER_DATA_DIR=$PWD/chrome-user-data330 |
johndoe@example.com
, you should not archive with that account, but instead create a new account for archiving like johndoeswitness@example.com
.
334 |
335 | Name | 356 |Domains | 357 |Last Used | 358 |Settings | 359 |Actions | 360 |
---|
466 | | URL | 467 |Title | 468 |Timestamp | 469 |
---|
${snapshot.url}
429 |
432 |