forked from Polymer/old-docs-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.html
More file actions
55 lines (47 loc) · 2.13 KB
/
footer.html
File metadata and controls
55 lines (47 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% for js in page.js %}
<script {% if js.defer %}defer{% endif %} src="{{js.src}}"></script>
{% endfor %}
<script src="https://apis.google.com/js/plusone.js"></script>
<script src="/js/prettify/prettify.js"></script>
<script src="/js/jquery.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-39334307-1']);
_gaq.push(['_trackPageview']);
// Analytics
(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);
})();
function addPermalink(el) {
el.classList.add('has-permalink');
el.insertAdjacentHTML('beforeend',
'<a class="permalink" title="Permalink" href="#' + el.id + '">#</a>');
}
// Change "active" style on selected left-hand navigation menu item.
$(document).ready(function () {
var path = location.pathname;
$('ul.nav > li > a[href="' + path + '"]').parent().addClass('active');
// Add permalinks to heading elements.
var permalinkEl = document.querySelector('.show-permalinks');
if (permalinkEl) {
['h2','h3','h4'].forEach(function(h, i) {
[].forEach.call(permalinkEl.querySelectorAll(h), addPermalink);
});
}
// TODO: Use kramdown {:.prettyprint .linenums .lang-ruby} to add the
// <pre class="prettyprint"> instead of doing this client-side.
$('pre').addClass('prettyprint');
window.prettyPrint && prettyPrint();
});
// Twitter
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
// Plus one async.
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>