Revert "Revert "Detect history.pushState""

This reverts commit e98df104b53edaa7b6c4d3f0ef5c43fa0e50f0d4.