var divs = document.getElementsByTagName("DIV"); var postCount = 0; var acct = '2046ca3ac16cb11cb6fa24a18b81cd9b'; var thisdate = new Date(); var newImage = document.createElement('img'); newImage.src ="https://www.intensedebate.com/remoteVisit.php?acct="+acct+"&time="+thisdate.getTime(); newImage.style.display = "none"; var lastTitle = ""; var lastURL = ""; for(var i=0; i < divs.length; i++) { if(divs[i].className == "post") { postCount++; if(postCount==1 && !document.getElementById('idc-container')) { var newDiv = document.createElement("div"); newDiv.id="idc-container"; divs[i].appendChild(newDiv); } } } if(postCount==0) //assume the funky theme { if(!document.getElementById('idc-container')) { var newDiv = document.createElement("div"); newDiv.id="idc-container"; document.getElementById('posts').appendChild(newDiv); } } function IDgetReference(url) { actualRef = url.substr(0, url.lastIndexOf("/")); lastParam = actualRef.substr(actualRef.lastIndexOf("/")+1); if(isNumeric(lastParam)) return actualRef; else return url; } if(postCount<=1) //insert comment system { var links = document.getElementsByTagName('A'); for(var i=0; i