3
votes

Disqus doesn't appear on localhost. I tried this solution, but I believe this method has been deprecated because it no longer works. All of the answers I've seen online are that, but they're all a few years old. If anyone knows how to test it on a localhost without an active server or domain, I'd really appreciate it. Here is the code I have (what Disqus gives you on their site):

<div id="disqus_thread"></div>
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = ''; // required: replace example with your forum shortname

    /* * * 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 powered by Disqus.</a>
</noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

EDIT: In case you're wondering, the only thing that shows up is the "Comments powered by Disqus" as a link.

1
@kalimba - why did you remove information from the question?Schorsch
@Schorsch Didn't notice when I approved it, sorry.Jose Magana

1 Answers

2
votes

This is a long shot but can you try

    dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';

instead of

    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';

Make sure you test it when running a server rather opening a plain html file.