hotlink to snapshots using generic search query link instead of id__startswith

This commit is contained in:
Nick Sweeting 2024-08-19 18:35:35 -07:00
parent 3148d2a3ef
commit 7164fb961c
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View file

@ -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()