Change contains function to indexOf, because contains function doesn't support in Chrome