My chrome extension is intended to periodically take screenshot from a web URL, and update some local disk data. I know how to do it by opening a new tab and taking the screenshot of it. But is there a way to avoid a new tab being opened, or at least open a hidden tab without annoying the user and doing all this silently?
I don't want to generate screenshots on a server, I need to do this all in the local machine.
I know that my suggestion won't answer the question literally, but as I noticed there are many questions on the web regarding taking screenshots or grabs of webpage periodically, I'll post it anyway. Others who stumble across this question might benefit from the answer.
If you are using Mac OSX and don't mind bypassing Chrome all together, one could use webkit2png.
Obtain it either from
http://www.paulhammond.org/webkit2png/http://www.paulhammond.org/webkit2png/
or use Homebrew
brew install webkit2png
and:
webkit2png http://google.com/
The Mac version of webkit2png is derived from a Linux-original, that I've not tested. I mention this because in other questions elsewere on internet and Stack Exchange, Linux was specifically mentioned.
http://khtml2png.sourceforge.net/
and / or