disqus: ensure same discussion is used regardless of query params in URL
This commit is contained in:
parent
ff41fd2547
commit
f070c21692
@ -3,6 +3,9 @@
|
|||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var disqus_shortname = '{{ site.disqus }}';
|
var disqus_shortname = '{{ site.disqus }}';
|
||||||
|
// ensure that pages with query string get the same discussion
|
||||||
|
var url_parts = window.location.href.split("?");
|
||||||
|
var disqus_url = url_parts[0];
|
||||||
(function() {
|
(function() {
|
||||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||||
|
Loading…
Reference in New Issue
Block a user