Is there any simple way to get all javascript code in the current page programmatically?
For example:
<html>
<head></head>
<script type="text/javascript" src="myjs.js">
<script type="text/javascript" src="userjs.js">
<script>
//user's jscode here
</script>
</html>
And I need to put some code in myjs.js, and need to be able to get all javascript code, including the code in userjs.js, and the code in the script tag.
Actually getting the code inside the script tag is easy. But I'm stucked on how to get the code in userjs.js.