Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2022-09-07 11:37:50 +0300
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-09-08 13:02:08 +0300
commit962e73ff877d22ffe994bf8bc8cf6b9598798e8a (patch)
treea4529f783d556612842c5e8af98799f7c1e66a3e /src
parentf0d0d2d7f4ffb717dea197c6671f7e09eb2a2a97 (diff)
fix pdfviewer on public pages
Signed-off-by: szaimen <szaimen@e.mail.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/public.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/public.js b/src/public.js
index d29db3f..61e2040 100644
--- a/src/public.js
+++ b/src/public.js
@@ -71,7 +71,12 @@ window.addEventListener('DOMContentLoaded', function() {
contentElmt.appendChild(viewerNode)
viewerNode.src = viewerUrl
footerElmt.style.display = 'none'
- mainContent.style.minHeight = '100%' // Make the viewer take the whole height as the footer is now hidden.
+ mainContent.style.minHeight = 'calc(100% - var(--header-height))' // Make the viewer take the whole height as the footer is now hidden.
+ // overwrite style in order to fix the viewer on public pages
+ mainContent.style.marginLeft = '0'
+ mainContent.style.marginRight = '0'
+ mainContent.style.width = '100%'
+ mainContent.style.borderRadius = 'unset'
} else {
logger.error('Unable to inject the PDF Viewer')
}