File tree 4 files changed +13
-13
lines changed
4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 8
8
9
9
< script >
10
10
function redirectToUrlWithoutTrailingSlash ( ) {
11
- var currentUrl = window . location . href ;
12
- if ( currentUrl . endsWith ( '/' ) ) {
13
- var newUrl = currentUrl . slice ( 0 , - 1 ) ;
11
+ const currentUrl = window . location . href ;
12
+ if ( currentUrl . endsWith ( '/' ) ) {
13
+ const newUrl = currentUrl . slice ( 0 , - 1 ) ;
14
14
window . location . href = newUrl ;
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -54,13 +54,13 @@ <h3 class="footer-heading">{{ site.title }}</h3>
54
54
55
55
< script >
56
56
( function ( ) {
57
- var cx = '010278526350603011374:ubkdl6gezwc' ;
58
- var gcse = document . createElement ( 'script' ) ;
57
+ const cx = '010278526350603011374:ubkdl6gezwc' ;
58
+ const gcse = document . createElement ( 'script' ) ;
59
59
gcse . type = 'text/javascript' ;
60
60
gcse . async = true ;
61
61
gcse . src = ( document . location . protocol == 'https:' ? 'https:' : 'http:' ) +
62
62
'//cse.google.com/cse.js?cx=' + cx ;
63
- var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
63
+ const s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
64
64
s . parentNode . insertBefore ( gcse , s ) ;
65
65
} ) ( ) ;
66
66
</ script >
@@ -77,7 +77,7 @@ <h3 class="footer-heading">{{ site.title }}</h3>
77
77
{% else %}
78
78
< script >
79
79
$ ( '#page-content' ) . toc ( {
80
- showAlways :
80
+ showAlways :
81
81
} ) ;
82
82
</ script >
83
83
{% endif %}
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ title: Random
4
4
---
5
5
6
6
<script type =" text/javascript " >
7
- let posts = [{% for post in site .posts % }" {{ post.url }}" {% unless forloop .last % },{% endunless % }{% endfor % }];
8
- let randomIndex = Math .floor (Math .random () * posts .length );
9
- let post = posts[randomIndex];
7
+ const posts = [{% for post in site .posts % }" {{ post.url }}" {% unless forloop .last % },{% endunless % }{% endfor % }];
8
+ const randomIndex = Math .floor (Math .random () * posts .length );
9
+ const post = posts[randomIndex];
10
10
window .location .href = post;
11
11
</script >
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ title: tag
19
19
20
20
<script >
21
21
function getTag () {
22
- var href = window .location .href ;
22
+ const href = window .location .href ;
23
23
if (href .indexOf (' ?' ) == - 1 ) {
24
24
return " " ;
25
25
}
26
- var hashes = href .slice (href .indexOf (' ?' ) + 1 ).split (' &' );
26
+ const hashes = href .slice (href .indexOf (' ?' ) + 1 ).split (' &' );
27
27
return unescape (hashes[0 ]);
28
28
}
29
29
30
- var tag = getTag ();
30
+ const tag = getTag ();
31
31
if (tag == " " ) {
32
32
$ (" .tagsec" ).each (function () {$ (this ).show ()});
33
33
} else {
You can’t perform that action at this time.
0 commit comments