Skip to content

Commit b7a7391

Browse files
committed
Added few more items for minor performance gains.
1 parent c930930 commit b7a7391

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

_includes/head.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<link href="{{ " /static/css/custom.css" | prepend: site.baseurl }}" rel="stylesheet">
2727

2828
<!-- Main Scripts -->
29-
<script src="{{" /static/assets/app-20180125.min.js"| prepend: site.baseurl }}"></script>
30-
<script src="{{" /static/assets/blog-20180125.min.js"| prepend: site.baseurl }}"></script>
29+
<script async src="{{" /static/assets/app-20180125.min.js"| prepend: site.baseurl }}"></script>
30+
<script async src="{{" /static/assets/blog-20180125.min.js"| prepend: site.baseurl }}"></script>
3131

3232
<!-- Bootstrap -->
3333
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

_includes/index_head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<link href="{{ " /static/css/custom.css" | prepend: site.baseurl }}" rel="stylesheet">
1616

1717
<!-- Main scripts -->
18-
<script src="{{ " /static/assets/app-20180125.min.js" | prepend: site.baseurl }}"></script>
18+
<script async defer src="{{ " /static/assets/app-20180125.min.js" | prepend: site.baseurl }}"></script>
1919
{% if site.data.index.projects %}
2020
<script async defer src="{{ " /static/js/github_api.min.js" | prepend: site.baseurl }}"></script>
2121
{% endif %}

static/js/count.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
$(document).ready(function () {
22
pre_content = $("#jalpc_site_pv").html();
33
$("#jalpc_site_pv").html(pre_content);
4-
// $.ajax({
5-
// type: "get",
6-
// async: false,
7-
// url: "https://miniapp.jack003.com/counter.cgi",
8-
// dataType: "jsonp",
9-
// jsonp: "callback",
10-
// jsonpCallback: "flightHandler",
11-
// success: function (json) {
12-
// var website_count = json.data;
13-
// $("#jalpc_site_pv").html('<span class="navy">' + website_count + '</span>&nbsp;<span data-i18n="link.view">views</span>&nbsp;||&nbsp;' + pre_content);
14-
// },
15-
// error: function () {
16-
// console.log('fail');
17-
// }
18-
// });
4+
$.ajax({
5+
type: "get",
6+
async: false,
7+
url: "https://miniapp.jack003.com/counter.cgi",
8+
dataType: "jsonp",
9+
jsonp: "callback",
10+
jsonpCallback: "flightHandler",
11+
success: function (json) {
12+
var website_count = json.data;
13+
$("#jalpc_site_pv").html('<span class="navy">' + website_count + '</span>&nbsp;<span data-i18n="link.view">views</span>&nbsp;||&nbsp;' + pre_content);
14+
},
15+
error: function () {
16+
console.log('fail');
17+
}
18+
});
1919
});

0 commit comments

Comments
 (0)