Commits

Yu-Jie Lin committed 5526a5d

Load Disqus on page load and move comment notice to HTML

  • Participants
  • Parent commits 6b20817

Comments (0)

Files changed (2)

File src/css/yjlv-base.css

 
 #comment-notice {
   margin-bottom: 1em;
+  line-height: 1.2em;
+}
+
+#comment-notice .star {
+  color: #FFBF00;
+  font-size: 26px;
 }
 
 /* Post footer */

File src/js/yjlv-base.js

       if ($e.width() != max_width)
         $e.width(max_width);
       });
+
   // Processing special Labels
   var SPECIAL_LABELS = [
       ['StatusDraft', 'StatusDraft', 'This post is a draft.'],
         }
       }
     });
+
   // Unwrapper
   if ($('.wrapper').length > 0) {
     $(window).resize(function(){
 
   // Don't go below?
   if (document.location.protocol == 'file:' || document.location.host == 'localhost')
-    return
-  // Put a note of commenting
-  $('<div id="comment-notice">Please keep your comments relevant to this post and try not to comment something like only "Thanks" in entire comment, use the Like button of Disqus, instead. You can use <a href="http://docs.disqus.com/help/19/">some HTML tags</a> if you like.</div>').insertAfter($('#post-comments h2'));
+    return;
+
   // Disqus
   var query = '?';
   $.each($('a[href$=#disqus_thread]'), function (idx, ele) {
       });
   $.ajaxSetup({cache: true});
   $.getScript('http://disqus.com/forums/yjlv/get_num_replies.js' + query);
-  // If visitors are led to comments, then load comments automatically.
-  var href = document.location.href;
-  if ( href.indexOf('#disqus_thread') >= 0
-    || href.indexOf('#comment-') >=0
-    || href.indexOf('?showComment=') >= 0 // for me only
-     ) {
-    $.getScript('http://yjlv.disqus.com/embed.js');
-    $('#comments-loader-button').remove();
-    }
+  $.getScript('http://yjlv.disqus.com/embed.js');
   $.ajaxSetup({cache: false});
   });
-
-// vim: set sw=2 ts=2 et: