Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
Facebook Highlight Birthdays
Highlights today's birthdays on your home page.
Recent Changes
0.7 (June 19, 2008) - Made compatible with Firefox 3.
0.61 (May 31, 2008) - Updated to work with all the other languages Facebook offers (Catalan, German, Spanish, French, Korean, Italian, Dutch, Japanese, Norwegian, and Polish).
0.6 (May 3, 2008) - Fixed again to reflect changes to the site.
0.5 (April 25, 2008) - Fixed bug where upcoming events and birthdays would both be highlighted. Hopefully I've covered all the bases now.
0.4 (April 24, 2008) - Fixed bug where birthdays would not be highlighted if you had no upcoming events.
0.3 (April 23, 2008) - Fixed to reflect changes to the site.
|
|
Thanks, dariusz. But you've got me thinking, and I think I can make the script language-neutral. I'll work on it, but if it doesn't work out, I'll include the Polish translations and ask for people to submit others. |
|
|
hey man, the script stops to work if you use any of the other languages facebook now supports. i changed your code to adapt to Polish as well:
window.gm_HighlightBirthdays = function() {
// the following gets events and birthdays. either or both may be there (or neither), but birthdays is always last.
var foo = document.evaluate("//div[@class='sidebar_item birthdays']",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for (k = 0; k < foo.snapshotLength; k++) {
birthdayBox = foo.snapshotItem(k);
if (/Birthdays/.test(birthdayBox.getElementsByTagName('h2')[0].innerHTML) || /Urodziny/.test(birthdayBox.getElementsByTagName('h2')[0].innerHTML)) {
var divs = birthdayBox.getElementsByTagName('div');
for (i = 0; i < divs.length; i++) {
if (divs[i].className.indexOf('sidebar_item_body') > -1) {
var h4s = divs[i].getElementsByTagName('h4');
for (j = 0; j < h4s.length; j++) {
if (/Today/.test(h4s[j].innerHTML) || /Dzisiaj/.test(h4s[j].innerHTML)) {
h4s[j].style.background = '#fffe88 ! important';
h4s[j].style.fontWeight = 'bold ! important';
h4s[j].style.padding = '5px 5px 0px 5px ! important';
h4s[j].nextSibling.style.background = '#fffe88 ! important';
h4s[j].nextSibling.style.fontWeight = 'bold ! important';
h4s[j].nextSibling.style.padding = '0px 5px 5px 5px ! important';
}
}
break;
}
}
break;
}
}
}
gm_HighlightBirthdays();
|
|
|
Well, it didn't have any conflicting scripts, but I can't test anything until Monday, as nobody's birthday is today. |
|
|
Try it now. |
|
|
it hightlights but events only :l |
|
|
It works for me. Make sure you don't have any scripts conflicting with it. |
|
|
Hmm, doesn't seem to work..... I'll look into it and see if I can find out why... |
|
|
Thank you, I find this script useful and I like the colors to. :) |
|
|
I really like it. I always hate it when I forget one of my friends' birthday because I don't see the info but now it always sticks out! Thanks! |
|
|
Simple yet brilliant. Props to you my good sir! |
You could comment on this script if you were logged in.
