不知何故,我无法使Disqus this.callbacks.onNewComment工作。会出什么问题呢?我在试着提醒(‘嘿!’)一旦有新的评论发布。Source
<script>
var disqus_config = function () {
this.page.url = PAGE_URL;
this.page.identifier = PAGE_IDENTIFIER;
this.callbacks.onNewComment = [function(comment) {
alert(comment.id);
alert(comment.text);
alert('hey!');
}];
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://example.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
发布于 2017-07-27 22:09:21
PAGE_URL和PAGE_IDENTIFIER需要特定于您的站点第二个帖子让我大吃一惊,因为我以为这是为了表明新帖子到了。
https://stackoverflow.com/questions/45084827
复制相似问题