From 4a55b136f6405628ccfcff5e8729376eec0cc894 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sun, 7 Aug 2022 16:55:11 +0400 Subject: [PATCH] Enabled random page button in the iframe-based viewer --- static/viewer.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/static/viewer.html b/static/viewer.html index 0da1f40e1..3fe39e88d 100644 --- a/static/viewer.html +++ b/static/viewer.html @@ -32,10 +32,12 @@ title="Go to the main page of the current book" aria-label="Go to the main page of the current book" onclick="gotoMainPageOfCurrentBook()"> - + + + @@ -93,6 +95,10 @@ location.hash = currentBook + '/'; } + function gotoRandomPage() { + cf.src = `${root}/random?content=${currentBook}`; + } + function setCurrentBook(book, title) { currentBook = book; currentBookTitle = title;