in reply to Perlmonks AJAX Voting
Your latest version has a minor typo. Line 104 should be:
if (xpNodelet) {
instead of:
if (xpNodelet)