mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed Disqus integration, as the minifier killed the config
This commit is contained in:
parent
e66fd1755b
commit
1037d591be
@ -8,5 +8,5 @@
|
|||||||
{% if not page.is_homepage and disqus %}
|
{% if not page.is_homepage and disqus %}
|
||||||
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
|
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
|
||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
<script>window.addEventListener("load",function(){var e,t;e=document,(t=e.createElement("script")).src="//{{ disqus }}.disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),(e.head||e.body).appendChild(t)})</script>
|
<script>var disqus_config=function(){this.page.url="{{ page.canonical_url }}",this.page.identifier="{{ page.canonical_url | replace(config.site_url, '') }}"};window.addEventListener("load",function(){var e=document,i=e.createElement("script");i.src="//{{ disqus }}.disqus.com/embed.js",i.setAttribute("data-timestamp",+new Date),(e.head||e.body).appendChild(i)})</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -31,18 +31,16 @@
|
|||||||
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
|
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
|
||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
var disqus_config = function () {
|
||||||
|
this.page.url = "{{ page.canonical_url }}";
|
||||||
|
this.page.identifier =
|
||||||
|
"{{ page.canonical_url | replace(config.site_url, '') }}";
|
||||||
|
};
|
||||||
window.addEventListener("load", function() {
|
window.addEventListener("load", function() {
|
||||||
var disqus_config = function () {
|
var d = document, s = d.createElement("script");
|
||||||
this.page.url = "{{ page.canonical_url }}";
|
s.src = "//{{ disqus }}.disqus.com/embed.js";
|
||||||
this.page.identifier =
|
s.setAttribute("data-timestamp", +new Date());
|
||||||
"{{ page.canonical_url | replace(config.site_url, '') }}";
|
(d.head || d.body).appendChild(s);
|
||||||
};
|
|
||||||
(function() {
|
|
||||||
var d = document, s = d.createElement("script");
|
|
||||||
s.src = "//{{ disqus }}.disqus.com/embed.js";
|
|
||||||
s.setAttribute("data-timestamp", +new Date());
|
|
||||||
(d.head || d.body).appendChild(s);
|
|
||||||
})();
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user