From bcb324ffb94982d110136a1712252c8674cedd0e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 Nov 2020 15:33:08 +0530 Subject: [PATCH] Fix #1903659 [[Enhancement - Content server] Don't show arrows on cover when viewing random book](https://bugs.launchpad.net/calibre/+bug/1903659) --- src/pyj/book_list/book_details.pyj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pyj/book_list/book_details.pyj b/src/pyj/book_list/book_details.pyj index 070abc519e..8d12620458 100644 --- a/src/pyj/book_list/book_details.pyj +++ b/src/pyj/book_list/book_details.pyj @@ -457,6 +457,7 @@ def next_book(book_id, delta): def render_book(container_id, book_id): render_book.book_id = book_id + is_random = parse_url_params().book_id is '0' c = document.getElementById(container_id) if not c: return @@ -469,6 +470,8 @@ def render_book(container_id, book_id): button_style = f'cursor: pointer; border-radius: {border_radius//5}px;' button_style += 'color: #ccc; background-color:rgba(0, 0, 0, 0.75);' button_style += 'display: flex; justify-content: center; align-items: center; padding: 2px;' + if is_random: + button_style += 'display: none;' def prev_next_button(is_prev): return E.div(