Make js button disabling code to work in chrome