I have a web page which is working fine on my local machine, but when it is moved to the server, an ad script from google overwrites page image src. I want to find that particular script tag with that src and remove it. I know the url, but can not add an id or modify the DOM. Please help.
for eg:
<script src="one.js"><script>
<script src="two.js"><script>
<script src="three.js"><script>
so if
var scripts = document.getElementsByTagName ( "script" );
var l = scripts.length;
for ( var i = 0; i < l; ++ i ) {
if ( scripts[i].src ="one.js") {
//remove that particular script tag with one.js
}
}
document.querySelector("script[src='one.js']")@PaulRoub, Your point is valid!