Revert "replaces use of indexOf with more idomatic CoffeeScript"

This reverts commit e65dbf2cb5d21df7a7ded4d7b6f1c698c7d7f81b.