Make last commit working in all Browsers not only FF (Firefox is using contains while chrome and opera are using indexOf)