update the disqus universal embed script
This commit is contained in:
parent
d397b32328
commit
048d98300c
1 changed files with 16 additions and 16 deletions
|
@ -6,25 +6,25 @@
|
|||
|
||||
(in-package :coleslaw-disqus)
|
||||
|
||||
(defvar *disqus-header*
|
||||
(defparameter *disqus-header*
|
||||
"<div id=\"disqus_thread\"></div>
|
||||
<script type=\"text/javascript\">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = '~a';
|
||||
/* * * 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>
|
||||
var disqus_config = function () {
|
||||
this.page.url = \"~A\";
|
||||
this.page.identifier = \"~A\";
|
||||
};
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://~A.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</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>")
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href=\"https://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript>")
|
||||
|
||||
(defun enable (&key shortname)
|
||||
(defun enable (&key shortname site-url)
|
||||
(flet ((inject-p (x)
|
||||
(when (typep x 'post)
|
||||
(format nil *disqus-header* shortname))))
|
||||
(format nil *disqus-header* site-url shortname shortname))))
|
||||
(add-injection #'inject-p :body)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue