Added debug test to javascript in index.html