Like I need it to read the first line of a .txt file and store
whatever is on the first line into a greasemonkey variable, which I
can later address.
>
> Can greasemonkey/javascript read a .txt file? If so how?
That depends, is the text file on a server somewhere? If so, you can
use GM_xmlhttpRequest.
> Like I need it to read the first line of a .txt file and store
> whatever is on the first line into a greasemonkey variable, which I
> can later address.
To store data for later you can use GM_setValue and GM_getValue.
Search for the documentation on those to get started.
>
>
> >
> Actually, its a text file on my own computer and has nothing to do
> with the website. I dunno if theres something that can be done.
I'm pretty sure you don't want Greasemonkey scripts arbitrarily
checking out your local files (plus there are security limitations
preventing you from doing this). You could throw caution to the wind
and set up a local web server exposing the directory where the file
lives. Or write a proper Firefox extension.
>
> On Sep 13, 7:13 am, Dan Phiffer <d...@phiffer.org> wrote: