Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ JB :
num_posts: 5
width: 580
colorscheme: light
weibo :
uid : 123

# Settings for analytics helper
# Set 'provider' to the analytics provider you want to use.
Expand Down
2 changes: 2 additions & 0 deletions _includes/JB/comments
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
{% include JB/comments-providers/intensedebate %}
{% when "facebook" %}
{% include JB/comments-providers/facebook %}
{% when "weibo" %}
{% include JB/comments-providers/weibo %}
{% when "custom" %}
{% include custom/comments %}
{% endcase %}
Expand Down
13 changes: 13 additions & 0 deletions _includes/JB/comments-providers/weibo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script type="text/javascript">
(function(){
var url = "http://widget.weibo.com/distribution/comments.php?width=0&url=auto&border=1&fontsize=14&skin=9&ralateuid={{ site.JB.comments.weibo.uid }}&language=zh_cn&iframskin=9&dpc=1";
url = url.replace("url=auto", "url=" + document.URL);
document.write('<iframe id="WBCommentFrame" src="' + url + '" scrolling="no" frameborder="0" style="width:100%"></iframe>');
})();
</script>
<script src="http://tjs.sjs.sinajs.cn/open/widget/js/widget/comment.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
window.WBComment.init({
"id": "WBCommentFrame"
});
</script>