Browse Source

Remote duoshuo support

Fechin 7 years ago
parent
commit
d2c9cd7397
4 changed files with 0 additions and 34 deletions
  1. 0 2
      _config.yml
  2. 0 1
      layout/_partial/post/article.ejs
  3. 0 3
      layout/_partial/post/duoshuo.ejs
  4. 0 28
      source/js/diaspora.js

+ 0 - 2
_config.yml

@@ -18,8 +18,6 @@ cover: /img/cover.jpg
 keywords: Fechin 
 # 要使用google_analytics进行统计的话,这里需要配置ID
 google_analytics: UA-69833742-2
-# 多说系统站点名称
-duoshuo_shortname: fechin
 # 网站ico
 favicon: /img/favicon.png
 rss: atom.xml

+ 0 - 1
layout/_partial/post/article.ejs

@@ -11,6 +11,5 @@
                 <source type="audio/mpeg" src="<%- page.mp3 || theme.mp3 %>">
             </audio>
         </div>
-        <%- partial('duoshuo', {post: page}) %>
     </div>
 </div>

+ 0 - 3
layout/_partial/post/duoshuo.ejs

@@ -1,3 +0,0 @@
-<% if (theme.duoshuo_shortname){ %>
-<div class="comment link" data-id="<%= post.path %>" data-title="<%= post.title %>" data-url="<%= post.permalink %>" data-shortname="<%- theme.duoshuo_shortname%>">查看评论</div>
-<% } %>

+ 0 - 28
source/js/diaspora.js

@@ -504,34 +504,6 @@ $(function() {
                 return false;
                 break;
 
-            // comment
-        case - 1 != tag.indexOf("comment") && -1 != tag.indexOf("link") :
-			Diaspora.loading();
-            $(".comment").removeClass("link").html("");
-            var id = $(".comment").data("id"),
-            title = $(".comment").data("title"),
-            url = $(".comment").data("url"),
-            shortname = $(".comment").data("shortname");
-            window.duoshuoQuery = {
-                short_name: shortname
-            };
-            var f = function() {
-                var a = document.createElement("div");
-                a.setAttribute("data-thread-key", id);
-                a.setAttribute("data-title", title);
-                a.setAttribute("data-url", url);
-                DUOSHUO.EmbedThread(a);
-                $(".comment").html(a);
-                $('html,body').animate({scrollTop: document.body.scrollHeight - 70},"slow");
-                Diaspora.loaded();
-            };
-            window.DUOSHUO ? f() : $.getScript("http://static.duoshuo.com/embed.js",
-            function() {
-                f()
-            });
-            return false;
-            break;
-
             default:
                 return;
                 break;