mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-30 14:35:20 -04:00
hotlink to snapshots using generic search query link instead of id__startswith
This commit is contained in:
parent
3148d2a3ef
commit
7164fb961c
3 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue