implemented in coffee

added new option to allow the change detection to be done by the text of
the options.

I don't know prototype but I've done my best.