The javascript would replace the parent tab with the fake page by abusing the window.opener.location.replace function