Skip to content

Commit 20416b9

Browse files
authored
Merge pull request #356 from github/js-cleanup
Js cleanup
2 parents 63ddabd + 8ec0547 commit 20416b9

File tree

18 files changed

+33
-499
lines changed

18 files changed

+33
-499
lines changed

β€Ž_includes/footer.htmlβ€Ž

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ <h3 class="alt-h3 mb-3">Subscribe to updates</h3>
3737
</div>
3838
</form>
3939
</div>
40-
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script><script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
4140
</div>
4241
</div>
4342
</div>
@@ -54,10 +53,5 @@ <h3 class="alt-h3 mb-3">Subscribe to updates</h3>
5453
</a>
5554
and <a href="https://github.com/github/open-source-guide/graphs/contributors" class="text-gray">friends</a>
5655
</div>
57-
58-
5956
</div>
60-
61-
62-
6357
</footer>

β€Ž_includes/head.htmlβ€Ž

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
<head>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
45
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i" rel="stylesheet">
56
<link href="{{ "/assets/css/index.css" | relative_url }}" rel="stylesheet">
6-
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
7-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
8-
<script src="{{ "/js/script.js" | relative_url }}"></script>
9-
<script>
10-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
11-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
12-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
13-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
14-
15-
ga('create', 'UA-3769691-72', 'auto');
16-
ga('send', 'pageview');
17-
18-
</script>
197
{% seo %}
208
</head>

β€Ž_layouts/default.htmlβ€Ž

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,9 @@
77
{{ content }}
88
</div>
99
</main>
10-
<script src="{{ "/js/vendor/anchor-js/anchor.min.js" | relative_url }}"></script>
11-
<script>
12-
var selector = '#content h2, #content h3, #content h4, #content h5';
1310

14-
anchors.options = {
15-
//visible: 'always',
16-
placement: 'left'
17-
};
18-
anchors.add(selector);
19-
20-
$(selector).wrapInner('<span/>');
21-
</script>
11+
<script src="{{ "/assets/js/index.js" | relative_url }}"></script>
12+
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script>
13+
<script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
2214
</body>
2315
</html>

β€Ž_layouts/landing.htmlβ€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.

β€Žassets/js/ga.jsβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
2+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
3+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
4+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
5+
6+
ga('create', 'UA-3769691-72', 'auto');
7+
ga('send', 'pageview');

β€Žassets/js/index.jsβ€Ž

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
---
3+
4+
{% include_relative jquery.min.js %}
5+
{% include_relative anchor.min.js %}
6+
{% include_relative ga.js %}
7+
{% include_relative toc.js %}
8+
9+
(function() {
10+
var selector = '.article-body h2, .article-body h3, .article-body h4, .article-body h5';
11+
anchors.options = {
12+
placement: 'left'
13+
};
14+
anchors.add(selector);
15+
16+
$(selector).wrapInner('<span/>');
17+
})();

β€Žassets/js/jquery.min.jsβ€Ž

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

0 commit comments

Comments
Β (0)