LPS-45853 Move page custom JavaScript to outside single page application condition