Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating to latest Disqus scripts

  • Loading branch information...
commit 4d83cc1e1dc0c1129339be1494a937a377d12a93 1 parent 38744ee
@detro authored
View
26 themes/default/listing.html
@@ -28,19 +28,17 @@
<a id="next" href="{{config.url_prefix}}{{next_page}}">Older</a>
{% endif %}
{% if config.disqus_forum %}
- <script type="text/javascript">
- //<![CDATA[
- (function() {
- var links = document.getElementsByTagName('a');
- var query = '?';
- for(var i = 0; i < links.length; i++) {
- if(links[i].href.indexOf('#disqus_thread') >= 0) {
- query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
- }
- }
- document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/{{config.disqus_forum}}/get_num_replies.js' + query + '"></' + 'script>');
- })();
- //]]>
- </script>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = "{{config.disqus_forum}}";
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function () {
+ var s = document.createElement('script'); s.async = true;
+ s.type = 'text/javascript';
+ s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
+ }());
+ </script>
{% endif %}
{% endblock %}
View
33 themes/default/post.html
@@ -11,7 +11,7 @@
{% endfor %}
{% endif %}
</p>
-
+
{% if config.sharing_buttons %}
<div class="share-box">
<ul>
@@ -51,9 +51,9 @@
</ul>
</div>
{% endif %}
-
+
{{post.rendered}}
-
+
<p class="postmeta">
<span class="date">{{post.published_tz|date:config.date_format}}</span>
</p>
@@ -65,16 +65,29 @@
{% endif %}
{% if config.disqus_forum %}
- <h3 id="comments">Comments</h3>
+ <h2 id="comments">Comments</h2>
+
<div id="disqus_thread"></div>
+
{% if devel %}
- <script type="text/javascript">
- disqus_developer = 1;
- </script>
+ <script type="text/javascript">
+ disqus_developer = 1;
+ </script>
{% endif %}
- <script type="text/javascript" src="http://disqus.com/forums/{{config.disqus_forum}}/embed.js"></script>
- <noscript><a href="http://disqus.com/forums/{{config.disqus_forum}}/?url=ref">View the discussion thread.</a></noscript>
- <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = "{{config.disqus_forum}}";
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + 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>
{% endif %}
{% for block in config.sidebar_blocks %}
View
26 themes/squared/listing.html
@@ -42,20 +42,18 @@
</div><!-- end of div.pagination -->
{% if config.disqus_forum %}
-<script type="text/javascript">
-//<![CDATA[
-(function() {
- var links = document.getElementsByTagName('a'),
- query = '?';
- for(var i = 0; i < links.length; i++) {
- if(links[i].href.indexOf('#disqus_thread') >= 0) {
- query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
- }
- }
- document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/{{config.disqus_forum}}/get_num_replies.js' + query + '"></' + 'script>');
-})();
-//]]>
-</script>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = "{{config.disqus_forum}}";
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function () {
+ var s = document.createElement('script'); s.async = true;
+ s.type = 'text/javascript';
+ s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
+ }());
+ </script>
{% endif %}
{% endblock %}
View
37 themes/squared/post.html
@@ -29,7 +29,7 @@
{{post.rendered}}
</section>
</article><!-- end of article.content -->
-
+
{% if config.sharing_buttons %}
<div id="share_buttons">
<span class="serif">
@@ -68,7 +68,7 @@
</ul>
</div>
{% endif %}
-
+
</div><!-- end of #main -->
<div class="pagination clearfix">
@@ -85,16 +85,29 @@
</div><!-- end of div.pagination -->
{% if config.disqus_forum %}
-<h2 id="comments">Comments</h2>
-<div id="disqus_thread"></div>
-{% if devel %}
-<script type="text/javascript">
- disqus_developer = 1;
-</script>
-{% endif %}
-<script type="text/javascript" src="http://disqus.com/forums/{{config.disqus_forum}}/embed.js"></script>
-<noscript><a href="http://disqus.com/forums/{{config.disqus_forum}}/?url=ref">View the discussion thread.</a></noscript>
-<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+ <h2 id="comments">Comments</h2>
+
+ <div id="disqus_thread"></div>
+
+ {% if devel %}
+ <script type="text/javascript">
+ disqus_developer = 1;
+ </script>
+ {% endif %}
+
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = "{{config.disqus_forum}}";
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + 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>
{% endif %}
{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.