To extend the screengrab firefox extension. From the screengrab page: "Screengrab! saves webpages as images... It will capture what you can see in the window, the entire page, just a selection, a particular frame... basically it saves webpages as images - either to a file, or to the clipboard. It captures Flash too!"
It install itself as a little icon in the lower right corner of firefox screen, from ther you can save a part or the whole web page copying image to clipboard or saving it as file in the disk.
My need is to be able to so, but programatically from javascript. thats it.
My javascript must call the extension giving the URLs of pages to capture; then, the extension must open those pages in other firefox window, wait for the page to finish upload, "take the picture" and close the page, posting the grabbed image to a server. The parameters will be: the url list, the size of the new firefox window, the name for each grabbed image, and the server address to post each image.
Thats it, theres no more, just take an open code firefox extension and extend it a little bit more. Source code is available at google code.
A bonus would be:
- To be able to open pages from the list by groups, not one by one (5 at the same time, or 10 at the same time)
- To be able to choose to open the pages in the background
- To be able to choose leave the pages open after grabbing the images, and a control to close them all after that (may be, open them as tabs in a new firefox window)
Flexibility. Is there is other way to accomplish this task, I would be happy to hear it.