Skip to content

Commit 4a545c8

Browse files
committed
Simplify javascript
* Deletes unused js modules: * magnific-popup (tool for better image galleries) is not used at all * modernizr is not used at all (it creates window.Modernizr js object which is never used anywhere else) * Deletes obsolete js modules: * respond and html5shiv are used only in IE9, which had last version in 2011. We can reasonably assume those will not be very frequent, and the website should work there as-is anyway. * Puts javascripts to a single file * instead of using pre-built minified file, jekyll puts the files together through `{% include %}` * Uses "local" javascript instead of hardlink to bitcoincore * This allows easier future experimentation I wanted to also delete fitvids, but it is used on one page - https://bitcoincore.org/en/2016/01/13/development-visualisation-2015/ . So it is probably better to keep using it. This PR also removes minification as a by-product of using jekyll for putting js together. I think the performance difference is negligible, since jquery is already minified.
1 parent 9f840a4 commit 4a545c8

File tree

11 files changed

+7
-2082
lines changed

11 files changed

+7
-2082
lines changed

_includes/_head.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@
3232
<link rel="stylesheet" href="/assets/css/main.css">
3333
<meta http-equiv="cleartype" content="on">
3434

35-
<!-- HTML5 Shiv and Media Query Support -->
36-
<!--[if lt IE 9]>
37-
<script src="/assets/js/vendor/html5shiv.min.js"></script>
38-
<script src="/assets/js/vendor/respond.min.js"></script>
39-
<![endif]-->
40-
41-
<!-- Modernizr -->
42-
<!--[if lt IE 9 ]>
43-
<script src="/assets/js/vendor/modernizr-2.7.1.custom.min.js"></script>
44-
<![endif]-->
45-
4635
<!-- Icons -->
4736
<link rel="shortcut icon" href="/assets/images/favicon.ico"><!-- 16x16 -->
4837
<link rel="shortcut icon" href="/assets/images/favicon.png"><!-- 32x32 -->

_includes/_scripts.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
<!-- Modernizr -->
2-
<!--[if gt IE 8]><!-->
3-
<script src="/assets/js/vendor/modernizr-2.7.1.custom.min.js"></script>
4-
<!--<![endif]-->
51
</body>
62

7-
<script src="/assets/js/vendor/jquery-1.9.1.min.js"></script>'
8-
<script src="{{ site.url }}/assets/js/scripts.min.js"></script>
3+
<script src="/assets/js/scripts.js"></script>
94
{% if site.owner.google.analytics %}
105
<script>
116
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)