From 7164fb961c87d962a76716c020640fb2e8e5cb2a Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 19 Aug 2024 18:35:35 -0700 Subject: [PATCH] hotlink to snapshots using generic search query link instead of id__startswith --- archivebox/templates/admin/base.html | 2 +- archivebox/templates/core/snapshot.html | 2 +- archivebox/templates/core/snapshot_live.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archivebox/templates/admin/base.html b/archivebox/templates/admin/base.html index 897a26d5..9bcf053a 100644 --- a/archivebox/templates/admin/base.html +++ b/archivebox/templates/admin/base.html @@ -281,7 +281,7 @@ // if we arrive at the index with a url like ??id__startswith=... // we were hotlinked here with the intention of making it easy for the user to perform some // actions on the given snapshot. therefore we should preselect the snapshot to save them a click - if (window.location.search.startsWith('?id__startswith=') || window.location.search.startsWith('?id__exact=')) { + if (window.location.search.startsWith('?')) { const result_checkboxes = [...document.querySelectorAll('#result_list .action-checkbox input[type=checkbox]')] if (result_checkboxes.length === 1) { result_checkboxes[0].click() diff --git a/archivebox/templates/core/snapshot.html b/archivebox/templates/core/snapshot.html index 4dac0beb..d3f4081d 100644 --- a/archivebox/templates/core/snapshot.html +++ b/archivebox/templates/core/snapshot.html @@ -351,7 +351,7 @@ WARC | Media | Git | - Actions | + Actions | Admin | See all files...
diff --git a/archivebox/templates/core/snapshot_live.html b/archivebox/templates/core/snapshot_live.html index b28c11c5..4b219c29 100644 --- a/archivebox/templates/core/snapshot_live.html +++ b/archivebox/templates/core/snapshot_live.html @@ -349,7 +349,7 @@
- + {{status|upper}}