Adding the detection into index.html for testing.