javascript collect all of the script elements code example
Example: javascript get all script tags on page
var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
if (scripts[i].src) {
console.log(i, scripts[i].src);
} else {
console.log(i, scripts[i].innerHTML);
}
}