Page 1 of 1

SourceGrab - Class to get the source code of the active browser window

Posted: 13 Aug 2015, 14:10
by evilC
This is a class to enable you to easily pull information from the source code of the active browser window.

Features:
  • Works by sending keystrokes (Ctrl-U, Ctrl-A, Ctrl-C) and will close the view source window once it has copied the source.
  • Currently works with Firefox, Chrome and IE
  • Example included which pulls the HTML DocType from the source of the active window when you hit F12, and types the DocType when you hit F11
  • Shows a confirmation dialog to let you know if it successfully grabbed the source.
  • Restores the state of the clipboard after use
https://github.com/evilC/SourceGrab/

Re: SourceGrab - Class to get the source code of the active browser window

Posted: 14 Aug 2015, 00:03
by boiler
Thanks for sharing this. It will be very helpful in a task I have which requires me to grab some info from the source code of dozens of pages.

Re: SourceGrab - Class to get the source code of the active browser window

Posted: 14 Aug 2015, 00:11
by Coldblackice
Cool idea, subbed and thanks!

Re: SourceGrab - Class to get the source code of the active browser window

Posted: 14 Aug 2015, 04:29
by evilC
New version up - Added support for IE

Re: SourceGrab - Class to get the source code of the active browser window

Posted: 14 Aug 2015, 06:16
by Guest10
Nice work. In Features: Works by sending keystrokes (Ctrl-U, Ctrl-A, Ctrl, C) ... >> (Ctrl-U, Ctrl-A, Ctrl-C) :ugeek:

Re: SourceGrab - Class to get the source code of the active browser window

Posted: 14 Aug 2015, 06:41
by evilC
fixed