Grep a page in firefox using javascript
Am writing an extension to provide grep'ing functionality in Firefox.  At my workplace we access all log files using a browser, and grep functionality would be ideal for filtering results, looking at only particular logging levels (INFO,WARN,ERROR) etc.

Have setup the extension boilerplate.

Was wondering if I could get some hints on the required javascript.  Am after a function:

    function grepPage(regex){
    ...
    }

which would apply the regex to each line in loaded text file in firefox, and only display lines that match.

This is the type of thing I could spend ages trying to work out, when I'm sure there would be simpler ways of doing this.

Any help would be highly appreciated.

Cheers,
Ben
Grep a page in firefox using javascript
===

Am writing an extension to provide grep'ing functionality in Firefox.  At my workplace we access all log files using a browser, and grep functionality would be ideal for filtering results, looking at only particular logging levels (INFO,WARN,ERROR) etc.

Have setup the extension boilerplate.

Was wondering if I could get some hints on the required javascript.  Am after a function:

    function grepPage(regex){
    ...
    }

which would apply the regex to each line in loaded text file in firefox, and only display lines that match.

This is the type of thing I could spend ages trying to work out, when I'm sure there would be simpler ways of doing this.

Any help would be highly appreciated.

Cheers,
Ben