From f2e0b5f02b626ecf3b28dc49efcd11129f39a423 Mon Sep 17 00:00:00 2001 From: chang-ning Date: Mon, 8 Oct 2018 07:08:56 +0800 Subject: [PATCH] Revert "add google ad" This reverts commit 77c7407b122750db818d294ef55abbe65405787b. --- app.py | 11 +++++++++-- docs/_templates/layout.html | 9 --------- docs/conf.py | 5 +---- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app.py b/app.py index 996593d5..488ea463 100644 --- a/app.py +++ b/app.py @@ -24,11 +24,18 @@ def find_key(token): csp = { "default-src": "'none'", "style-src": ["'self'", "'unsafe-inline'"], - "script-src": ["'self'", "*", "'unsafe-inline'", "'unsafe-eval'"], + "script-src": [ + "'self'", + "*.cloudflare.com", + "*.googletagmanager.com", + "*.google-analytics.com", + "'unsafe-inline'", + "'unsafe-eval'", + ], "form-action": "'self'", "base-uri": "'self'", "img-src": "*", - "frame-src": ["ghbtns.com", "googleads.g.doubleclick.net"], + "frame-src": "ghbtns.com", "frame-ancestors": "'none'", "object-src": "'none'", } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 266f5a87..7c4c3001 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -12,14 +12,5 @@ gtag('config', '{{ tracking_id }}'); {% endif -%} -{%- if google_ad_client %} - - -{% endif -%} {% endblock %} {% set css_files = css_files + [ "_static/style.css" ] %} diff --git a/docs/conf.py b/docs/conf.py index eb7ac9c3..9d0881dc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,10 +132,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". html_title = "pysheeet" -html_context = { - "tracking_id": os.environ.get("TRACKING_ID"), - "google_ad_client" : os.environ.get("GOOGLE_AD_CLIENT") -} +html_context = {"tracking_id": os.environ.get("TRACKING_ID")} # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None