It defines isTipCupUser() and creates an event handler for tip events, calling tipcup_ontip(amount).
Examples from tipcup.org:
if (isTipCupUser()){
this.onload = function () {
tipSpan.innerHTML =
"we really dig that you use tipcup!";
}
}
function tipcup_ontip(amt){
tipSpan.innerHTML =
"You are awesome! Thanks for the $"
+ amt + " tip!";
}
Check back for updates.