JavaScript extractor from webpage - Bookmarklet

March 19, 2016

You can extract JavaScript inside any webpage using a bookmarklet. Creating a bookmarklet is just easy, you will drag the below link to your bookmarks bar. This not only extracts the scripts used inside any webpage but also formats it.

This also works for android Chrome browser. Which can be used as an chrome android extension.

To use, Open the page to be extracted, let it load completely then click on the bookmarks bar. This will open the new window with the extracted code.

javascript:(function(){s=document.getElementsByTagName('SCRIPT');tx='';sr=[];for(i=0;i<s.length;i++){with(s.item(i)){t=text;if(t){tx+=t}else{sr.push(src)}}};with({document.write('<textarea id="t">'+(sr.join("\n"))+"\n\n-----\n\n"+tx+'</textarea>');document.close()}})();


Do not spam.

Like us on Facebook

Blog Archive