Skip to content

Commit ef868ba

Browse files
committed
Merge branch 'master' of github.com:qiubaiying/qiubaiying.github.io
2 parents b5a4d6f + 95558c6 commit ef868ba

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

_layouts/default.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,27 @@
55

66
<!-- hack iOS CSS :active style -->
77
<body ontouchstart="">
8-
8+
<script type="text/javascript">
9+
function addBlankTargetForLinks () {
10+
$('a[href^="http"]').each(function(){
11+
$(this).attr('target', '_blank');
12+
});
13+
}
14+
15+
$(document).bind('DOMNodeInserted', function(event) {
16+
addBlankTargetForLinks();
17+
});
18+
19+
</script>
920
{% include nav.html %}
1021

1122
{{ content }}
1223

1324
{% include footer.html %}
1425

1526

27+
28+
1629
<!-- Image to hack wechat -->
1730
<img src="/img/icon_wechat.png" width="0" height="0" />
1831
<!-- Migrate from head to bottom, no longer block render and still work -->

0 commit comments

Comments
 (0)