Disqus: change captions after success with jQuery

一个人想着一个人 提交于 2019-12-04 16:06:43
Darin

Here is the answer andufo. It works:

$(document).ready(function() {
  window.disqus_no_style = true;

  $.getScript('http://sitename.disqus.com/embed.js', function() {
    var loader = setInterval(function() {
      if($('#disqus_thread').html().length) {
        clearInterval(loader);
        disqusReady();
      }
    }, 1000);
  });

  function disqusReady() {
    //whatever you can imagine
  }
});

You can comment out the $.getscript line and ending }); as well as the window.disqus_no_style = true; line.

I had a similar problem and posted this question. Mohamed attempted to answer me and his answer did not work but he'd posted a link to his code at github and I found the right answer there.

Chrome Extension iframe dom reference disqus

https://gist.github.com/471999

This simple solution also works, although the original text appears first, then is replaced with the new text, which is less then ideal.

function disqus_callback() {
  $('#dsq-reply h3').text('Add Your Answer');
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!