javascript in firefox extension to search

A

Alex

I think this is a general question about javascript, but i included
background in where i was using this code to give a clearer picture.

I creating a right-click tool, that allows a user to right-click on a
webpage, context menu shows up, click show vars, and a little msg box shows
up with the value of the variable.

I've got the firefox extension with the context menu, right-click thing
going, I'm new to javascripting. I just don't know how to search the page
source for text that looks like:
myVar = "some-data"

I want to be able to report "some-data" to the user using an alert(). if you
take a look at the source for this web page, it would look like:
.....
<!-- myVar = "some-data"; //-->
.....

any suggestions, code snippets, or links to tutorials for this stuff would
be appreciated.

can i start with var page = window._content.document; ? and somehow search
that page?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top