Only hook into fragment changes for JSON

For the fragment-highlighting, I put in a listener for fragment changes, but it was listening on HTML pages as well.