From b52c7aac5396484566595d4852fcf1390904ed67 Mon Sep 17 00:00:00 2001 From: Vijay Pillai Date: Thu, 10 Nov 2022 11:02:50 -0500 Subject: [PATCH] Added GOOGLE_SITE_VERIFICATION environmental value to enable google safe browsing --- cps/admin.py | 1 + cps/templates/http_error.html | 3 +++ cps/templates/layout.html | 3 +++ cps/templates/listenmp3.html | 3 +++ cps/templates/read.html | 3 +++ cps/templates/readcbr.html | 3 +++ cps/templates/readdjvu.html | 4 ++++ cps/templates/readpdf.html | 3 +++ cps/templates/readtxt.html | 4 ++++ cps/templates/shelfdown.html | 3 +++ 10 files changed, 30 insertions(+) diff --git a/cps/admin.py b/cps/admin.py index 09a553b4..b415f412 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -108,6 +108,7 @@ def before_request(): logout_user() g.constants = constants g.user = current_user + g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','') g.allow_registration = config.config_public_reg g.allow_anonymous = config.config_anonbrowse g.allow_upload = config.config_uploading diff --git a/cps/templates/http_error.html b/cps/templates/http_error.html index 103d1085..9c6c0f56 100644 --- a/cps/templates/http_error.html +++ b/cps/templates/http_error.html @@ -6,6 +6,9 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %} diff --git a/cps/templates/layout.html b/cps/templates/layout.html index 7502514a..22a6baec 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -8,6 +8,9 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %} diff --git a/cps/templates/listenmp3.html b/cps/templates/listenmp3.html index 2067bf38..ff1ac049 100644 --- a/cps/templates/listenmp3.html +++ b/cps/templates/listenmp3.html @@ -8,6 +8,9 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %} diff --git a/cps/templates/read.html b/cps/templates/read.html index e5311998..1b890c33 100644 --- a/cps/templates/read.html +++ b/cps/templates/read.html @@ -7,6 +7,9 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %} diff --git a/cps/templates/readcbr.html b/cps/templates/readcbr.html index 411e3fdd..9a7a489a 100644 --- a/cps/templates/readcbr.html +++ b/cps/templates/readcbr.html @@ -7,6 +7,9 @@ {{_('Comic Reader')}} | {{title}} + {% if g.google_site_verification|length > 0 %} + + {% endif %} diff --git a/cps/templates/readdjvu.html b/cps/templates/readdjvu.html index 3504e394..ff512e79 100644 --- a/cps/templates/readdjvu.html +++ b/cps/templates/readdjvu.html @@ -6,6 +6,10 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %} + diff --git a/cps/templates/readpdf.html b/cps/templates/readpdf.html index ca3f2389..6d696374 100644 --- a/cps/templates/readpdf.html +++ b/cps/templates/readpdf.html @@ -26,6 +26,9 @@ See https://github.com/adobe-type-tools/cmap-resources + {% if g.google_site_verification|length > 0 %} + + {% endif %} {{_('PDF Reader')}} | {{title}} diff --git a/cps/templates/readtxt.html b/cps/templates/readtxt.html index b157fe95..71dd0e98 100644 --- a/cps/templates/readtxt.html +++ b/cps/templates/readtxt.html @@ -7,6 +7,10 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %} + diff --git a/cps/templates/shelfdown.html b/cps/templates/shelfdown.html index 1016c0a2..50f339b9 100755 --- a/cps/templates/shelfdown.html +++ b/cps/templates/shelfdown.html @@ -6,6 +6,9 @@ + {% if g.google_site_verification|length > 0 %} + + {% endif %}