CBL-Mariner/SPECS-EXTENDED/python-openstackdocstheme/0001-Remove-all-Google-Anal...

63 строки
2.3 KiB
Diff

From 454bc007e96a4a85d1210ab44863cf53615e0b6f Mon Sep 17 00:00:00 2001
From: Javier Pena <jpena@redhat.com>
Date: Thu, 3 Mar 2016 14:13:21 +0100
Subject: [PATCH] Remove all Google Analytics tracking
Even if https://github.com/openstack/openstackdocstheme/commit/89b0475539ac6763baa27f5fc334639ee3853ebf
made Google Analytics optional, it was still present in
script_search.html
---
.../theme/openstackdocs/script_search.html | 26 -------------------
.../theme/openstackdocs/theme.conf | 2 +-
2 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/openstackdocstheme/theme/openstackdocs/script_search.html b/openstackdocstheme/theme/openstackdocs/script_search.html
index 98c9e9e..1141d82 100644
--- a/openstackdocstheme/theme/openstackdocs/script_search.html
+++ b/openstackdocstheme/theme/openstackdocs/script_search.html
@@ -1,28 +1,2 @@
-<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
- //<![CDATA[
-google.load('search', '1', {
- language: 'en'
-});
-var _gaq = _gaq ||[];
-_gaq.push([ "_setAccount", "UA-17511903-1"]);
-function _trackQuery(control, searcher, query) {
- var gaQueryParamName = "q";
- var loc = document.location;
- var url =[
- loc.pathname,
- loc.search,
- loc.search ? '&': '?',
- gaQueryParamName == '' ? 'q': encodeURIComponent(gaQueryParamName),
- '=',
- encodeURIComponent(query)].join('');
- _gaq.push([ "_trackPageview", url]);
-}
-google.setOnLoadCallback(function () {
- var customSearchControl = new google.search.CustomSearchControl('011012898598057286222:elxsl505o0o');
- customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
- customSearchControl.setSearchStartingCallback(null, _trackQuery);
- customSearchControl.draw('cse');
-},
-true);//]]>
</script>
diff --git a/openstackdocstheme/theme/openstackdocs/theme.conf b/openstackdocstheme/theme/openstackdocs/theme.conf
index ee5d0b4..cd43847 100644
--- a/openstackdocstheme/theme/openstackdocs/theme.conf
+++ b/openstackdocstheme/theme/openstackdocs/theme.conf
@@ -4,7 +4,7 @@ stylesheet = css/basic.css
pygments_style = native
[options]
-analytics_tracking_code = UA-17511903-1
+analytics_tracking_code =
sidebar_mode = toctree
display_badge = True
display_toc = True
--
2.17.1