Permalink
Browse files

Merge pull request #17 from thetylerhayes/master

More SSL action
  • Loading branch information...
2 parents 4d8af61 + 51aebae commit 12de697d01396b3d706ded699afa4a9567729a87 @dcramer dcramer committed Feb 17, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 disqus/disqus.php
View
@@ -1177,7 +1177,14 @@ function dsq_output_loop_comment_js($post_ids = null) {
}
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://<?php echo DISQUS_DOMAIN; ?>/forums/' + disqus_shortname + '/count.js';
+ <?php
+ if (is_ssl()) {
+ $connection_type = "https";
+ } else {
+ $connection_type = "http";
+ }
+ ?>
+ s.src = '<?php echo $connection_type; ?>' + '://' + '<?php echo DISQUS_DOMAIN; ?>/forums/' + disqus_shortname + '/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
//]]>

0 comments on commit 12de697

Please sign in to comment.