Use History interface to change URL without a redirection.
Inject the script after DOM is parsed in order to wait for window.title.