Skip to content

Commit 472d081

Browse files
committed
Move duoshuo comment script into partial.
1 parent ace529d commit 472d081

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script type="text/javascript">
2+
var duoshuoQuery = {short_name:"yncoder"};
3+
(function() {
4+
var ds = document.createElement('script');
5+
ds.type = 'text/javascript';ds.async = true;
6+
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
7+
ds.charset = 'UTF-8';
8+
(document.getElementsByTagName('head')[0]
9+
|| document.getElementsByTagName('body')[0]).appendChild(ds);
10+
})();
11+
</script>

_layouts/interview.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,7 @@ <h2>{{ person.name }}</h2>
196196

197197
<div class="ds-thread" data-thread-key="201501-I" data-title="freelancer-and-remoting" data-url="http://yncoder.github.io/event/2015-freelancer-and-remoting/"></div>
198198

199-
<script type="text/javascript">
200-
var duoshuoQuery = {short_name:"yncoder"};
201-
(function() {
202-
var ds = document.createElement('script');
203-
ds.type = 'text/javascript';ds.async = true;
204-
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
205-
ds.charset = 'UTF-8';
206-
(document.getElementsByTagName('head')[0]
207-
|| document.getElementsByTagName('body')[0]).appendChild(ds);
208-
})();
209-
</script>
199+
{% include duoshuo-comment-script %}
200+
210201
</body>
211202
</html>

0 commit comments

Comments
 (0)