Skip to content Skip to sidebar Skip to footer

Open Url In Same Tab And 'document.write' After

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

Solution 1:

I've reading some threads and just found that it is neither a document.write issue nor a cross origin limitation.

I will take what gion_13 wrote in one of the reference threads:

"it won't work. new page = new script. can't run a script in a different page that it's declared in."

References:

Javascript bookmarklet go to URL and execute

Load a page and apply javascript in a single bookmark

tampermonkey script stops working if I change the page

Post a Comment for "Open Url In Same Tab And 'document.write' After"