Skip to content

Commit

Permalink
Convert random shuffle link to a button
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrini committed Sep 10, 2024
1 parent 59c8fa5 commit 62504a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openlibrary/templates/search/sort_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@
$if not loop.last:
|
$if selected_sort and selected_sort.startswith('random') and not is_bot():
(<a href="$changequery(page=None, sort='random_%s' % today().timestamp())"
$# This is a button to avoid bots getting stuck in a random sort
(<button
data-ol-link-track="SearchSort|RandomShuffle"
rel="nofollow"
>$_('Shuffle')</a>)
onclick="window.location = $dumps(changequery(page=None, sort='random_%s' % today().timestamp()));"
>$_('Shuffle')</button>)
</span>

0 comments on commit 62504a5

Please sign in to comment.