Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
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! |