Facebook Favicon Alerts

By Peter Wooley Last update Sep 8, 2009 — Installed 2,988 times.

New Facebook Design

in
Subscribe to New Facebook Design 6 posts, 4 voices



AcumenProbitas User
FirefoxWindows

Seems that the script is broken by facebook's redesign.

 
Peter Wooley Script's Author
FirefoxWindows

Yep. Should get to work on it this weekend.

 
Rob Bittner Scriptwright
FirefoxWindows

any luck with this?

 
Rob Bittner Scriptwright
FirefoxWindows

actually, I think i may have a fix for this. for me anyway, it looks like in this.getSearchText, if you change your "var element" line (line 226) to this :
var element = document.getElementById("notificationsWrapper").childNodes[0].childNodes[0];

that seems to do the trick. You may want to have a little more elegant solution, but for now that seems to work for me.

 
Wheee! User
FirefoxWindows

yeap. that works! thanks Rob.
the script also needs to remove the 0 count:) like the gmail script does..

 
Wheee! User
FirefoxWindows

this seems to work for me:)
this.getSearchText = function() {
var ncount = 0;
var elements = new Array('requestsWrapper', 'mailWrapper', 'notificationsWrapper');
for (ii = 0; ii < elements.length; ii++) {
element = document.getElementById("notificationsWrapper");
if (element) {
ncount += parseInt(element.childNodes[0].childNodes[0].textContent);
}
}
return ncount > 0 ? ncount : '';
}

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel