Is there a way to display external JavaScript code in an alert
or another location by accessing the variable value s_code
?
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = 'http://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js?'+Math.random();
s_code = newscript.toString();
alert(s_code);
})();
This needs to be accomplished using pure JavaScript without any external libraries.