forked from github/pelican
This replaces all `http://` and `//:` links with `https:`. The protocol- relative URL scheme is now deemed to be an anti-pattern. There are security advantages to using HTTPS, and there are no significant performance concerns. In short, if the asset we need is available via HTTPS, then that asset should always be loaded via HTTPS. Fixes #1736
46 lines
1.7 KiB
HTML
46 lines
1.7 KiB
HTML
{% if GOOGLE_ANALYTICS %}
|
|
<script type="text/javascript">
|
|
var _gaq = _gaq || [];
|
|
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
|
|
_gaq.push(['_trackPageview']);
|
|
(function() {
|
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
ga.src = 'https://ssl.google-analytics.com/ga.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
})();
|
|
</script>
|
|
{% endif %}
|
|
{% if GAUGES %}
|
|
<script type="text/javascript">
|
|
var _gauges = _gauges || [];
|
|
(function() {
|
|
var t = document.createElement('script');
|
|
t.type = 'text/javascript';
|
|
t.async = true;
|
|
t.id = 'gauges-tracker';
|
|
t.setAttribute('data-site-id', '{{GAUGES}}');
|
|
t.src = '//secure.gaug.es/track.js';
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(t, s);
|
|
})();
|
|
</script>
|
|
{% endif %}
|
|
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
|
<script type="text/javascript">
|
|
{% if PIWIK_SSL_URL %}
|
|
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
|
{% else %}
|
|
var pkBaseURL = "{{ PIWIK_URL }}";
|
|
{% endif %}
|
|
var _paq = _paq || [];
|
|
_paq.push(["trackPageView"]);
|
|
_paq.push(["enableLinkTracking"]);
|
|
(function() {
|
|
var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/";
|
|
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
|
_paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
|
|
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
|
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
|
})();
|
|
</script>
|
|
{% endif %}
|