Always don't specify title value for history.replaceState.
Try the injection twice, before and after the DOM parsing (and some JavaScript.)