update the disqus universal embed script

This commit is contained in:
Claire Medeiros 2017-07-24 01:25:15 -04:00
parent d397b32328
commit 048d98300c

View file

@ -6,25 +6,25 @@
(in-package :coleslaw-disqus) (in-package :coleslaw-disqus)
(defvar *disqus-header* (defparameter *disqus-header*
"<div id=\"disqus_thread\"></div> "<div id=\"disqus_thread\"></div>
<script type=\"text/javascript\"> <script>
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_config = function () {
var disqus_shortname = '~a'; this.page.url = \"~A\";
/* * * DON'T EDIT BELOW THIS LINE * * */ this.page.identifier = \"~A\";
(function() { };
var dsq = document.createElement('script'); (function() { // DON'T EDIT BELOW THIS LINE
dsq.type = 'text/javascript'; var d = document, s = d.createElement('script');
dsq.async = true; s.src = 'https://~A.disqus.com/embed.js';
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date());
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); (d.head || d.body).appendChild(s);
})(); })();
</script> </script>
<noscript>Please enable JavaScript to view the <a href=\"http://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript> <noscript>Please enable JavaScript to view the <a href=\"https://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>")
(defun enable (&key shortname) (defun enable (&key shortname site-url)
(flet ((inject-p (x) (flet ((inject-p (x)
(when (typep x 'post) (when (typep x 'post)
(format nil *disqus-header* shortname)))) (format nil *disqus-header* site-url shortname shortname))))
(add-injection #'inject-p :body))) (add-injection #'inject-p :body)))