Facebook Highlight Birthdays

By Jordon Kalilich Last update Jul 22, 2010 — Installed 34,202 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 11 posts, 8 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Jordon Kalilich Script's Author

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.

 
dariusz Scriptwright

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();

 
iSecks.v2 User

Well, it didn't have any conflicting scripts, but I can't test anything until Monday, as nobody's birthday is today.

 
Jordon Kalilich Script's Author

Try it now.

 
M0rph3u5 User

it hightlights but events only :l

 
Jordon Kalilich Script's Author

It works for me. Make sure you don't have any scripts conflicting with it.

 
iSecks.v2 User

Hmm, doesn't seem to work..... I'll look into it and see if I can find out why...

 
Andreas F User

Thank you, I find this script useful and I like the colors to. :)

 
Trevor K. User

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!

 
Robbeh User

Simple yet brilliant. Props to you my good sir!