I'm trying to modify Facebook Purity (
http://bit.ly/fbpure) to display "msgs" or "msg" based on the number of applications blocked.
It shouldn't be that hard, but it's not working.
CODE
if(insertpoint && insertpoint.firstChild) {
var fbpurityinfo=document.createElement('div');
fbpurityinfo.setAttribute('class','UIOneOff_Container');
fbpurityinfo.style.marginBottom='12px';
var label;
if (crappyappmsgcounter==1){
label="msg";
}
else{
label="msgs";
}
fbpurityinfo.innerHTML = '<a href="http://bit.ly/fbpure">FB Purity</a> blocked: <span id="fbpblockcount">0</span> app ' + label + ' [ <a id="fbpshowblockedlink" href="java script:;">Show</a> ]';
insertpoint.insertBefore(fbpurityinfo, insertpoint.firstChild);
document.getElementById('fbpshowblockedlink').addEventListener("click", fbpshowblocked, false);
fpbblockcountspan=document.getElementById('fbpblockcount');
}
Am I doing something wrong or should it work?
This post has been edited by predator101: 18 Jun, 2009 - 05:50 PM