Remove script from site before executing
I have a site that I load via an iframe and on the same server. I need to remove the script tag before the page inside the iframe is loaded. In order of words, intercept and remove the script before executing it.
I tried
var x = doc.getElementsByTagName('script');
doc.getElementsByTagName('head').removeChild(x);
But it doesn't seem to be able to catch the script before it is executed. What other methods or options are there to achieve this goal?
thank
+3
source to share
2 answers