Debian Codegraph @

debian/patches/0003-Remove-cookies-and-tracking.patch

raw symbols SCIP
1 From: Nicolas Dandrimont <[email protected]>
2 Date: Thu, 8 Oct 2015 08:41:10 -0700
3 Subject: Remove cookies and tracking
4
5 Forwarded: not-needed
6
7 Patch-Name: 0003-Remove-cookies-and-tracking.patch
8 ---
9 cloud_sptheme/themes/cloud/layout.html | 30 ----------------------------
10 cloud_sptheme/themes/cloud/static/cloud.js_t | 6 ------
11 cloud_sptheme/themes/cloud/theme.conf | 2 +-
12 3 files changed, 1 insertion(+), 37 deletions(-)
13
14 --- a/cloud_sptheme/themes/cloud/layout.html
15 +++ b/cloud_sptheme/themes/cloud/layout.html
16 @@ -31,15 +31,11 @@
17 {{ super() }}
18
19 {# add script file to instrument collapsable sections and other features #}
20 - {{ compat_js_tag("_static/jquery.cookie.js") }}
21 {{ compat_js_tag("_static/cloud.base.js") }}
22 {{ compat_js_tag("_static/cloud.js") }}
23
24 {%- endblock %}
25
26 -{# add font stylesheets #}
27 -{% set css_files = css_files + [theme_fontcssurl] %}
28 -
29 {# make root link redirectable #}
30 {%- set theme_roottarget = (theme_roottarget == "<toc>" and master_doc or theme_roottarget) %}
31 {% block rootrellink %}
32 @@ -72,23 +68,6 @@
33 {% block extrahead -%}
34 {{ super() }}
35 <meta name="viewport" content="width=device-width, initial-scale=1">
36 - {%- if theme_googleanalytics_id -%}
37 -<script type="text/javascript">
38 -var ga_enabled = !$.cookie('disable-ga');
39 -if(ga_enabled){
40 - var _gaq = _gaq || [];
41 - _gaq.push(['_setAccount', '{{ theme_googleanalytics_id }}']);
42 - _gaq.push(['_setCookiePath', '{{ theme_googleanalytics_path }}']);
43 - _gaq.push(['_setDetectFlash', false]);
44 - _gaq.push(['_trackPageview']);
45 - (function() {
46 - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
47 - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
48 - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
49 - })();
50 -}
51 -</script>
52 - {%- endif %}
53 {%- endblock %}
54
55 {% block body -%}
56 @@ -121,17 +100,5 @@
57
58 {% block footer -%}
59 {{ super() }}
60 - {%- if theme_googleanalytics_id -%}
61 -<script type="text/javascript">
62 - if(ga_enabled){
63 - document.write("<div class=\"footer\">This page uses <a href=\"http://analytics.google.com\">Google Analytics</a> to collect statistics. ");
64 - 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.");
65 - document.write("</div>");
66 - }else{
67 - document.write("<div class=\"footer\">Google Analytics has been disabled. ");
68 - 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.");
69 - };
70 -</script>
71 - {%- endif %}
72 <!-- cloud_sptheme 1.4 -->
73 {%- endblock %}
74 --- a/cloud_sptheme/themes/cloud/static/cloud.js_t
75 +++ b/cloud_sptheme/themes/cloud/static/cloud.js_t
76 @@ -240,11 +240,7 @@
77
78 var $doc = $('div.document'),
79 $hide = $('button#sidebar-hide'),
80 - $show = $('button#sidebar-show'),
81 - copts = {
82 - // expires: 7,
83 - path: utils.rootpath
84 - };
85 + $show = $('button#sidebar-show');
86
87 // set sidebar state for current media size
88 var lastSmall = false,
89 @@ -262,7 +258,6 @@
90 } else {
91 largeState = visible;
92 if(!visible) { smallState = false; }
93 - $.cookie("sidebar", visible ? "expanded" : "collapsed", copts);
94 }
95 $window.trigger("cloud-sidebar-toggled", visible);
96 }
97 @@ -280,7 +275,7 @@
98 if(smallScreen){
99 setState(false);
100 } else {
101 - var value = $.cookie("sidebar");
102 + var value = "";
103 {% if theme_defaultcollapsed | tobool %}
104 if (!value) value = "collapsed";
105 {% endif %}
106 --- a/cloud_sptheme/themes/cloud/theme.conf
107 +++ b/cloud_sptheme/themes/cloud/theme.conf
108 @@ -183,7 +183,7 @@
109
110 # font css url - for loading in fonts (eg google font dir)
111 # should include source for all fonts referenced by "headfont", "bodyfont", and "codeblockfont"
112 -fontcssurl = https://fonts.googleapis.com/css?family=Noticia+Text:400,i,b,bi|Open+Sans:400,i,b,bi|Roboto+Mono:400,i,b,bi&display=swap
113 +fontcssurl =
114
115 # set google analytics tracker
116 googleanalytics_id =