From b7f0eb13ef63f122c6953f97f2203df0afcb705b Mon Sep 17 00:00:00 2001 From: David Ball Date: Sun, 23 Jun 2024 15:19:15 -0400 Subject: [PATCH] fix: Embed PDF documents only on pages which describe files. --- app/views/directory.ejs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/views/directory.ejs b/app/views/directory.ejs index 2eeecef8..edfe52dd 100644 --- a/app/views/directory.ejs +++ b/app/views/directory.ejs @@ -39,18 +39,20 @@ <% } %> -
-
-

OCR Text Scan (approximately)

-

- This text scan may contain automatically generated text as generated using Apache Tika - and Tesseract. It may not be correct. No effort has been made to correct any of these scans - (so far). These OCR scans are also used in the site's Search feature. Please review the - Search Policy for details about the site features. -

-
<%- h.printReadme(directory) %>
+ <% if (typeof h.readmeFm(directory).file !== 'undefined') { %> +
+
+

OCR Text Scan (approximately)

+

+ This text scan may contain automatically generated text as generated using Apache Tika + and Tesseract. It may not be correct. No effort has been made to correct any of these scans + (so far). These OCR scans are also used in the site's Search feature. Please review the + Search Policy for details about the site features. +

+
<%- h.printReadme(directory) %>
+
-
+ <% } %> <% } %>