tools to extract javascript from the page

JavaScript
$('script').each(function(){ 
    alert($(this).html()) 
});

Source

Also in JavaScript: