JavaScript Get all Loaded Scripts [duplicate]
This question already has answers here : How to collect all script tags of HTML page in a variable (6 answers) Closed last year . I am trying to create a Javascript function that will return all javascript files loaded. For Example: I load jquery.js, jquery.somescript.js, and tinymce.js I want a function to return everything in script format (so if I were to save and run the return text again) it would work just as if I had called the files described above. Also if TinyMCE loads 15 JS fies, it should return as well. I hope that isn't too confusing to understand, but any help would be greatly