2 Options to Show All JavaScript on Page
Share
Here are 2 options to quickly view all the JavaScript used on a web page. Could come in handy when trying to find event handlers or specific code without searching through individual files.
- Option 1: Bookmarklet – A bookmarklet (drag it to your bookmarks) by Ichiro Hiroshi to see all JavaScript’s used on the web page includes script links only and inline code.
- Option 2: Web Developer Toolbar – A Firefox add-in that allows you to view all JavaScript loaded on page, it includes all content of include scripts and inline code.
The Bookmarklet
Just drag this button into your bookmarks then run on any page to see scripts.
The Code
javascript: (function () {
s = document.getElementsByTagName('SCRIPT');
tx = '';
sr = [];
for (i = 0; i ' (sr.join("n"))"nn-----nn"
tx '');
document.close();
}
})();
Firefox Developer Toolbar
Install the Firefox Add-on.
Visit any web page, select from the toolbar > Information > View JavaScript.
It shows you all JavaScript used on the page including the content within the included .js files too.