[Python-modules-commits] [cloud-sptheme] 05/10: Remove cookies and tracking
Sandro Tosi
morph at moszumanska.debian.org
Tue Dec 13 12:22:13 UTC 2016
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository cloud-sptheme.
commit b8da379d62adc562991aa7837ddaf646c218b146
Author: Nicolas Dandrimont <olasd at debian.org>
Date: Thu Oct 8 08:41:10 2015 -0700
Remove cookies and tracking
Forwarded: not-needed
Patch-Name: 0003-Remove-cookies-and-tracking.patch
---
cloud_sptheme/themes/cloud/layout.html | 32 +---------------------------
cloud_sptheme/themes/cloud/static/cloud.js_t | 6 ------
2 files changed, 1 insertion(+), 37 deletions(-)
diff --git a/cloud_sptheme/themes/cloud/layout.html b/cloud_sptheme/themes/cloud/layout.html
index 017fce6..7cf2936 100644
--- a/cloud_sptheme/themes/cloud/layout.html
+++ b/cloud_sptheme/themes/cloud/layout.html
@@ -19,8 +19,7 @@
{% set reldelim2 = reldim2 is not defined and ' ' or reldelim2 %}
{# add script file to instrument collapsable sections and other features #}
-{% set script_files = script_files + ['_static/jquery.cookie.js',
- '_static/cloud.js'] %}
+{% set script_files = script_files + ['_static/cloud.js'] %}
{# add font stylesheets #}
{% set css_files = css_files + [theme_fontcssurl] %}
@@ -57,23 +56,6 @@
{% block extrahead -%}
{{ super() }}
<meta name="viewport" content="width=device-width, initial-scale=1">
- {%- if theme_googleanalytics_id -%}
-<script type="text/javascript">
-var ga_enabled = !$.cookie('disable-ga');
-if(ga_enabled){
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', '{{ theme_googleanalytics_id }}']);
- _gaq.push(['_setCookiePath', '{{ theme_googleanalytics_path }}']);
- _gaq.push(['_setDetectFlash', false]);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-}
-</script>
- {%- endif %}
{%- endblock %}
{% block body -%}
@@ -106,17 +88,5 @@ if(ga_enabled){
{% block footer -%}
{{ super() }}
- {%- if theme_googleanalytics_id -%}
-<script type="text/javascript">
- if(ga_enabled){
- document.write("<div class=\"footer\">This page uses <a href=\"http://analytics.google.com\">Google Analytics</a> to collect statistics. ");
- document.write("Click <button title=\"set cookie to disable analytics for this site\" class=\"link\" onclick=\"$.cookie('disable-ga', 'true', {expires: 3650, path: '{{ theme_googleanalytics_path }}'}); window.location.reload(); return false; \">here</button> to disable analytics for this site.");
- document.write("</div>");
- }else{
- document.write("<div class=\"footer\">Google Analytics has been disabled. ");
- document.write("Click <button title=\"set cookie to re-enable analytics for this site\" class=\"link\" onclick=\"$.cookie('disable-ga', null, {path: '{{ theme_googleanalytics_path }}'}); window.location.reload(); return false; \">here</button> to re-enable analytics for this site.");
- };
-</script>
- {%- endif %}
<!-- cloud_sptheme 1.4 -->
{%- endblock %}
diff --git a/cloud_sptheme/themes/cloud/static/cloud.js_t b/cloud_sptheme/themes/cloud/static/cloud.js_t
index 5aca993..0357cb1 100644
--- a/cloud_sptheme/themes/cloud/static/cloud.js_t
+++ b/cloud_sptheme/themes/cloud/static/cloud.js_t
@@ -322,10 +322,6 @@
var $doc = $('div.document'),
$hide = $('button#sidebar-hide'),
$show = $('button#sidebar-show'),
- copts = {
- // expires: 7,
- path: abspath(DOCUMENTATION_OPTIONS.URL_ROOT || "")
- };
// set sidebar state for current media size
var lastSmall = false,
@@ -345,7 +341,6 @@
} else {
largeState = visible;
if(!visible) { smallState = false; }
- $.cookie("sidebar", visible ? "expanded" : "collapsed", copts);
}
$window.trigger("cloud-sidebar-toggled", visible);
}
@@ -363,7 +358,6 @@
if(smallScreen){
setState(false);
} else {
- var value = $.cookie("sidebar");
{% if theme_defaultcollapsed | tobool %}
if (!value) value = "collapsed";
{% endif %}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cloud-sptheme.git
More information about the Python-modules-commits
mailing list