Skip to content

Commit

Permalink
feat(load): support duoshuo
Browse files Browse the repository at this point in the history
  • Loading branch information
cubesky committed Jan 19, 2017
1 parent 5d1dd5d commit e126b1b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions layout/_partial/footer-option.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
<% if(theme.comment.use == "duoshuo") { %>
<!-- 多说公共 js 代码 start -->
<script type="text/javascript">
var duoshuoQuery = {
short_name: '<%= theme.comment.shortname %>'
};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';
ds.async = true;
ds.src = '<%= theme.comment.duoshuo_embed_js_url %>';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
queue.offer(function(){
var duoshuoQuery = {
short_name: '<%= theme.comment.shortname %>'
};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';
ds.async = true;
ds.src = '<%= theme.comment.duoshuo_embed_js_url %>';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
});
</script>
<!-- 多说公共 js 代码 end -->
<% } %>
Expand Down

0 comments on commit e126b1b

Please sign in to comment.