如何从网页中删除Disqus底部信息

13
我想要移除Disqus插件的页脚。Disqus功能正常,但是页脚看起来有点重复。我希望移除页脚,这样我只能看到相关评论。您可以在图片末尾看到页脚。
<div class="well">
  <div id="disqus_thread"></div>
  <script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'destinationcompk'; // required: replace example with your forum shortname
    function disqus_config() {
      this.callbacks.afterRender.push(function() { alert('clayton') });
    }

    var disqus_identifier = "image_".concat(12);
    var disqus_title = "image_title".concat(12);

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function () {
        var dsq = document.createElement('script');
        dsq.type = 'text/javascript';
        dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
  </script>
  <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments
  </a></noscript>
</div>

前往Fiddle按钮

我只是想隐藏页脚而已!


2
我不熟悉Disqus雇用的服务条款,但我想这可能会违反它们。 - SW4
你有这个运行的演示吗? - Wez
http://jsfiddle.net/764W9/25/ - A.J.
3
如果您移除Disqus内容中的页脚,实际上会违反Disqus服务条款。这些条款规定,“您同意不修改、适应、编辑来自任何Disqus内容的作品”,“您同意Disqus可能在服务实施过程中包含由Disqus提供的广告和/或内容。您同意遵守...以启用广告的适当交付、展示、跟踪和/或报告。”如果您不同意这些服务条款,请不要使用Disqus。 - davidcondrey
使用或不使用是另一个争论。我们是工程师,应该知道这件事是否可以执行。有道理吗? - A.J.
2
@Clayton 我们也应该避免对为我们的网站提供免费服务的人不友善。 - ceejayoz
5个回答

42

在你的CSS中添加:

#disqus_thread {
     position: relative;
}
#disqus_thread:after {
     content: "";
     display: block;
     height: 55px;
     width: 100%;
     position: absolute;
     bottom: 0;
     background: white;
}

你知道在Iframe中,我们的CSS是否不适用于那里吗? - A.J.
4
这是正确的答案。尽管我不相信Disqus会接受隐藏页脚,但这个解决方案完成了工作。 - Drewman
1
那个答案中有一个错字,第一个 CSS 选择器中的 "discus" 应该是 "disqus"。 - Thomas Davis
1
你好 Yahreen,你可以使用媒体查询来调整它,使用这个概念。 - fanta
2
代表匿名用户建议编辑,应注意将背景更改为与周围内容的背景相匹配。 - bjb568
显示剩余2条评论

9

您可以使用负边距和溢出隐藏。

#disqus_thread {
  overflow: hidden;

  iframe {
    margin-bottom: -54px;
  }
}


好多了,因为它不仅仅在上面留下一个白色的框。 - Matthias
此外,对于移动设备,请添加overflow-x:hidden属性。(至少在iOS中进行测试。) - Matthias

6

1
我认为你是对的。那么在任何情况下,我们都可以移除页脚吗? - A.J.

1

除了技术上的变通方法外,还有一种合法的方法可以解决这个问题。根据该网站的说法,您可以通过购买Pro订阅来删除此内容,目前每月大约需要支付100美元。

https://<accountname>.disqus.com/admin/settings/general/

Disqus Branding Toggle Option in Settings


-4
在Joomla管理面板中,转到管理员 - 扩展 - 插件管理器并禁用Disqus以下是示例截图:

enter image description here


2
这将从页面中移除Disqus,而不是Disqus页脚。抱歉。 - A.J.

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接