Half of my question was answered with this.
I need to open another url (or replace location/href/src, whatever) in the current tab and after that inject HTML via document.write (or innerHTML, whatever) into the new page.
The code will be used in a Chrome bookmarklet which will open an enhanced version of the new page.
Here is what I got so far:
javascript: window.open('https://stackoverflow.com/','_self').document.write('Page Booster 3000');
Any thoughts are appreciated.
P.S 1: the code partially works if the url parameter is empty (''), but it remains in the old page domain.
P.S 2: any way of achieving this in plain vanilla JS?