INNER CODE UNIT · JavaScript
msg
SethClydesdale/cunny-code · resources/javascript/arona.js:1234
msg = message[Math.floor(Math.random() * message.length)];
if (timeout++ > 1000) break; // break out if no different message could be chosen
}
// have Arona say the selected message
if (duration && callback) {
Arona.say(msg[0], msg[1] || 1, duration, callback);
} else if (duration) {
Arona.say(msg[0], msg[1] || 1, duration);
} else {
Arona.say(msg);
}
// cache current selection for comparison next time
Arona[cache] = msg;
},
// Arona quits helping Sensei after being mean to her 5 times