mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00: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()
|
||||
|
|
|
@ -351,7 +351,7 @@
|
|||
<a href="warc/" title="Any WARC archives for the page">WARC</a> |
|
||||
<a href="media/" title="Audio, Video, and Subtitle files.">Media</a> |
|
||||
<a href="git/" title="Any git repos at the url">Git</a> |
|
||||
<a href="/admin/core/snapshot/?id__startswith={{snapshot_id}}" title="Go to the Snapshot admin to update, overwrite, or delete this Snapshot">Actions</a> |
|
||||
<a href="/admin/core/snapshot/?q={{snapshot_id}}" title="Go to the Snapshot admin to update, overwrite, or delete this Snapshot">Actions</a> |
|
||||
<a href="/admin/core/snapshot/{{snapshot_id}}/change/" title="Edit this snapshot in the Admin UI">Admin</a> |
|
||||
<a href="." title="Webserver-provided index of files directory.">See all files...</a><br/>
|
||||
</div>
|
||||
|
|
|
@ -349,7 +349,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="badge badge-{{status_color}}" style="float: left">
|
||||
<a href="/admin/core/snapshot/?id__startswith={{snapshot_id}}" title="Click to see options to pull, re-snapshot, or delete this Snapshot">
|
||||
<a href="/admin/core/snapshot/?q={{snapshot_id}}" title="Click to see options to pull, re-snapshot, or delete this Snapshot">
|
||||
{{status|upper}}
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue