[Greasemonkey] Text file and GM

Rod McGuire mcguire at telerama.com
Tue Sep 26 17:13:32 EDT 2006


Quoting alain samoun <alain at sonic.net>:
> If I receive a text file in FF from a web site. Is it possible to use GM
> to capture the text and add some html to it?
> I know the text is somewhere in the browser since it is shown on the
> browser's window, but I don't know how
> to get it...and create a new HTML doc with it. Or is that impossible?

If you are going to develop greasemonkey scripts, you will need to know how to
use the DOM inspector.

If you run it on a loaded "text" page you will see that the text is wrapped as a
regular web page (i.e. the 'body' holds 1 'pre' that contains the entire text.

Greasemonky scripts work fine on 'text' pages.



More information about the Greasemonkey mailing list