Fix Disqus over https.

Forcing http:// as protocol will make Disqus fail when server over
  https for security reasons.
This commit is contained in:
Alexandre Perrin 2013-10-03 10:00:27 +02:00
parent 4cc7682033
commit 0a1b94d222

View File

@ -14,7 +14,7 @@
{% endif %}
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
dsq.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>