Commit 288f5806

mo khan <mo@mokhan.ca>
2013-07-05 21:46:43
fix single sign on setup
1 parent 9c31e6d
Changed files (1)
app
views
app/views/shared/_disqus.html.erb
@@ -6,17 +6,13 @@ var disqus_identifier = '<%= id %>';
   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>
 <% if current_user %>
-<script type="text/javascript" charset="utf-8">
-(function(){
   var disqus_config = function(){
     this.page.remote_auth_s3 = '<%= disqus_auth %>';
     this.page.api_key = '<%= ENV['DISQUS_API_KEY'] %>';
   };
+<% end %>
 })();
 </script>
-<% end %>
 <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>