forked from AdamWilsonLabEDU/SpatialDataScience
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisqus.js
More file actions
22 lines (20 loc) · 865 Bytes
/
disqus.js
File metadata and controls
22 lines (20 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var disqus_config = function () {
this.page.url = 'http://adamwilson.us/SpatialDataScience/' + location.pathname;
};
$(document).ready(function() {
var inIFrame = function() {
var iframe = true;
try { iframe = window.self !== window.top; } catch (e) {}
return iframe;
};
if (inIFrame()) return;
// create disqus script tag
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://rdataanalysis.disqus.com/embed.js';
// determine container
var container = document.getElementsByTagName('body')[0] || document.getElementsByTagName('head')[0];
// append script tag enclosed by google indexing suppression comment
container.appendChild(document.createComment('googleoff: all'));
container.appendChild(dsq);
container.appendChild(document.createComment('googleon: all'));
});