I need to check every script tag's src value and if there is a match, I would like to change that script tags src attribute... Something like this:
var scripts = document.getElementsByTagName("script")[0].src
for (i=0;i<scripts.length;i++){
if(scripts[i] == "something.js"){
document.getElementsByTagName("script")[i].src = "this.js"
}
else {}
}}
var scripts = document.getElementsByTagName("script");
for (i=0;i<scripts.length;i++){
if(scripts[i].src == "something.js"){
scripts[i].src = "this.js";
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With