Final for now
This commit is contained in:
parent
28b5be76c5
commit
801a5b63df
53 changed files with 2047 additions and 621 deletions
|
|
@ -1,12 +1,22 @@
|
|||
var disqus_shortname = 'aceapi';
|
||||
|
||||
var paths = window.location.pathname.split("/");
|
||||
var fileName = paths[paths.length - 2] + "/" + paths[paths.length - 1];
|
||||
|
||||
var disqus_identifier = fileName;
|
||||
function setupDisqus() {
|
||||
var disqus_shortname = 'aceapi';
|
||||
var dsqId = "disqusScript";
|
||||
|
||||
//var paths = window.location.pathname.split("/");
|
||||
//var fileName = paths[paths.length - 2] + "/" + paths[paths.length - 1];
|
||||
|
||||
//var disqus_identifier = fileName;
|
||||
|
||||
var lochash = location.hash.substr(1);
|
||||
var disqus_identifier = "api/" + (lochash.substr(lochash.indexOf('api=')).split('&')[0].split('=')[1] || "index") + ".html";
|
||||
|
||||
(function() {
|
||||
if (document.getElementById(dsqId))
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).removeChild(document.getElementById(dsqId));
|
||||
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
dsq.id="disqusScript";
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
})();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue