js: put "loadComments" stuff in own file.
authorrekado <rekado@elephly.net>
Sun, 16 Aug 2015 03:10:38 +0000 (05:10 +0200)
committerrekado <rekado@elephly.net>
Mon, 17 Aug 2015 20:56:01 +0000 (22:56 +0200)
static/js/loadComments.js [new file with mode: 0644]

diff --git a/static/js/loadComments.js b/static/js/loadComments.js
new file mode 100644 (file)
index 0000000..cce27dc
--- /dev/null
@@ -0,0 +1,7 @@
+var loadComments = function() {
+  var el = document.getElementById("loadComments");
+  el.parentNode.removeChild(el);
+  var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+  dsq.src = 'http://elephly.disqus.com/embed.js';
+  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+};